diff options
author | Marvin Hagemeister <marvin@deno.com> | 2024-10-08 12:10:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 12:10:19 +0200 |
commit | 2d488e4bfb9ffdfd2d043cc4bba9e6037b4cc24e (patch) | |
tree | d71f96e94469ca3478e5a062c7240dc1986fc155 /ext/console | |
parent | 053894b9e0899757f156b8cd956fd467e0e11a63 (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.js | 4 |
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; } |