Skip to content

Commit

Permalink
fix(runner): should not await close if closed (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperStrike authored Oct 30, 2023
1 parent 94b0aba commit 4307ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/Runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export default class Runner {
}

// In headed / watch mode, wait for the browser to close.
if (this.watch || !this.headless) {
if ((this.watch || !this.headless) && !page.isClosed()) {
await page.waitForEvent('close', { timeout: 0 });
}

Expand Down

0 comments on commit 4307ab5

Please sign in to comment.