Skip to content

Commit

Permalink
Fix exception in console.log handler
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti committed Nov 4, 2023
1 parent df96abb commit c3cdbab
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 @@ -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))));
Expand Down

0 comments on commit c3cdbab

Please sign in to comment.