Skip to content

Commit

Permalink
fix: ignore null response
Browse files Browse the repository at this point in the history
Firefox apparently returns `null` when working on file urls.
Just ignore it.
  • Loading branch information
intrigus-lgtm committed Nov 25, 2024
1 parent 209f6a4 commit 7ddaf18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decktape.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ process.on('unhandledRejection', error => {
.catch(error => response.status() !== 200 ? Promise.reject(error) : response)
.then(_ => response))
// TODO: improve message when reading file locally
.then(response => console.log('Loading page finished with status: %s', response.status()))
.then(response => console.log('Loading page finished with status: %s', response !== null ? response.status() : "unknown status, reponse is null"))
.then(delay(options.loadPause))
.then(_ => createPlugin(page, plugins, options))
.then(plugin => configurePlugin(plugin)
Expand Down

0 comments on commit 7ddaf18

Please sign in to comment.