summaryrefslogtreecommitdiff
path: root/runtime/js/02_console.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/02_console.js')
-rw-r--r--runtime/js/02_console.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/js/02_console.js b/runtime/js/02_console.js
index fb659e342..bd6565e0e 100644
--- a/runtime/js/02_console.js
+++ b/runtime/js/02_console.js
@@ -873,7 +873,11 @@
nonUniqueCustomInspect in value &&
typeof value[nonUniqueCustomInspect] === "function"
) {
- return String(value[nonUniqueCustomInspect]());
+ // TODO(nayeemrmn): `inspect` is passed as an argument because custom
+ // inspect implementations in `op_crates` need it, but may not have access
+ // to the `Deno` namespace in web workers. Remove when the `Deno`
+ // namespace is always enabled.
+ return String(value[nonUniqueCustomInspect](inspect));
}
if (value instanceof Error) {
return String(value.stack);