Skip to content

Commit

Permalink
fix: do not force close nonexisant browser
Browse files Browse the repository at this point in the history
Fixes a bug where the browser would be forced closed even if it wasn't
launched yet.
  • Loading branch information
jniles committed Oct 7, 2020
1 parent 62bfa8f commit a2af0e2
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 138 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ process.on('beforeExit', async () => {
});

// force-close all subprocesses on exit.
process.on('exit', () => cluster.close());
process.on('exit', () => cluster && cluster.close());

module.exports = render;
Loading

0 comments on commit a2af0e2

Please sign in to comment.