From 7ddaf183877f9307e04ae4b4ccc91d489311c936 Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Mon, 25 Nov 2024 00:08:49 +0000 Subject: [PATCH] fix: ignore null response Firefox apparently returns `null` when working on file urls. Just ignore it. --- decktape.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decktape.js b/decktape.js index a4797fb..fb01d02 100755 --- a/decktape.js +++ b/decktape.js @@ -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)