From d73254f48b9833ad69d20a98a95583fbceac5a65 Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Sat, 4 Nov 2023 17:18:52 +0100 Subject: [PATCH] Fix exception in console.log handler --- decktape.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decktape.js b/decktape.js index ef7cc0c..da04587 100755 --- a/decktape.js +++ b/decktape.js @@ -273,7 +273,7 @@ process.on('unhandledRejection', error => { page .on('console', async msg => { - const args = msg.args().length + const args = msg.type() !== 'log' ? await Promise.all(msg.args().map(arg => arg.executionContext().evaluate(obj => obj, arg))) : [msg.text()]; console.log(...args.map(arg => color(msg.type())(util.format(arg))));