Skip to content

Commit

Permalink
Avoid unnecessary additional error
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Sep 9, 2024
1 parent 50ff2bc commit 19772a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion buildtools/check-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ function loaded(page, browser) {
loaded(page, browser);
})().catch(async (error) => {
console.log(`Unexpected error: ${error}.`);
await browser.close();
if (browser && !browserClosed) {
await browser.close();
}
process.exit(2);
});

0 comments on commit 19772a2

Please sign in to comment.