Skip to content

Commit

Permalink
feat(page): emit the event after removing the Worker (#7080)
Browse files Browse the repository at this point in the history
  • Loading branch information
pallavJha committed Apr 12, 2021
1 parent 943477c commit e34a6d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/Page.ts
Expand Up @@ -507,8 +507,8 @@ export class Page extends EventEmitter {
client.on('Target.detachedFromTarget', (event) => {
const worker = this._workers.get(event.sessionId);
if (!worker) return;
this.emit(PageEmittedEvents.WorkerDestroyed, worker);
this._workers.delete(event.sessionId);
this.emit(PageEmittedEvents.WorkerDestroyed, worker);
});

this._frameManager.on(FrameManagerEmittedEvents.FrameAttached, (event) =>
Expand Down

0 comments on commit e34a6d5

Please sign in to comment.