Skip to content

inspect: fix console.log(%s, { [Symbol.toPrimitive]: () => hello })

Rodrigo Muino Tomonari requested to merge github/fork/Ch3nYuY/fix/console-log into main

console.log("%s", o) invokes the inspect method to retrieve the object. This results in console.log("%s", { [Symbol.toPrimitive]: () => "hello" }) displaying the object itself, rather than 'hello'.

Fixes: #50909 (closed)

Merge request reports

Loading