From 4983f763d480f73a7e0d55549afb7af87fa7f04b Mon Sep 17 00:00:00 2001 From: MujahedSafaa <168719085+MujahedSafaa@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:02:32 +0300 Subject: fix(ext/console): prevent duplicate error printing when the cause is assigned (#25327) This commit fixes the error format when the cause is assigned separately, ensuring that the cause is only printed once instead of twice. The fix addresses issue [#21651](https://github.com/denoland/deno/issues/21651). --- ext/console/01_console.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/console') diff --git a/ext/console/01_console.js b/ext/console/01_console.js index 761368b57..9b5e6fe1a 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -1287,6 +1287,7 @@ function getKeys(value, showHidden) { ArrayPrototypePushApply(keys, ArrayPrototypeFilter(symbols, filter)); } } + keys = ArrayPrototypeFilter(keys, (key) => key !== "cause"); return keys; } -- cgit v1.2.3