Skip to content

Commit

Permalink
defined check
Browse files Browse the repository at this point in the history
  • Loading branch information
mikka23 committed Apr 20, 2021
1 parent 9a1c079 commit 11db9d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ app.get( '/', async ( req, res ) => {

return;
} catch ( e ) {
await chrome.close().catch( error => { console.error( 'Closing chrome failed...', error ); } );
if ( 'undefined' !== typeof chrome ) {
await chrome.close().catch( error => { console.error( 'Closing chrome failed...', error ); } );
}
console.log( e );
} finally {
await chrome.close().catch( error => { console.error( 'Closing chrome failed...', error ); } );
if ( 'undefined' !== typeof chrome ) {
await chrome.close().catch( error => { console.error( 'Closing chrome failed...', error ); } );
}
}
} );

Expand Down

0 comments on commit 11db9d6

Please sign in to comment.