summaryrefslogtreecommitdiff
path: root/ext/console
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-10-08 12:10:19 +0200
committerGitHub <noreply@github.com>2024-10-08 12:10:19 +0200
commit2d488e4bfb9ffdfd2d043cc4bba9e6037b4cc24e (patch)
treed71f96e94469ca3478e5a062c7240dc1986fc155 /ext/console
parent053894b9e0899757f156b8cd956fd467e0e11a63 (diff)
fix(console): missing cause property on non-error objects (#26061)
Fixes https://github.com/denoland/deno/issues/26047
Diffstat (limited to 'ext/console')
-rw-r--r--ext/console/01_console.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/console/01_console.js b/ext/console/01_console.js
index 1ca23d5a4..d9acc958a 100644
--- a/ext/console/01_console.js
+++ b/ext/console/01_console.js
@@ -1301,7 +1301,9 @@ function getKeys(value, showHidden) {
ArrayPrototypePushApply(keys, ArrayPrototypeFilter(symbols, filter));
}
}
- keys = ArrayPrototypeFilter(keys, (key) => key !== "cause");
+ if (ObjectPrototypeIsPrototypeOf(ErrorPrototype, value)) {
+ keys = ArrayPrototypeFilter(keys, (key) => key !== "cause");
+ }
return keys;
}