From 0209f7b46954d1b7bf923b4191e5a356ec09622c Mon Sep 17 00:00:00 2001 From: Chen Su Date: Tue, 14 Nov 2023 03:13:20 +0800 Subject: fix(ext/console): fix inspecting iterators error. (#20720) Fixes #19776 and #20676. --- ext/node/polyfills/internal/console/constructor.mjs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'ext/node/polyfills/internal/console/constructor.mjs') diff --git a/ext/node/polyfills/internal/console/constructor.mjs b/ext/node/polyfills/internal/console/constructor.mjs index 5ea9eeb3a..afa18bb97 100644 --- a/ext/node/polyfills/internal/console/constructor.mjs +++ b/ext/node/polyfills/internal/console/constructor.mjs @@ -17,17 +17,7 @@ import { validateInteger, validateObject, } from "ext:deno_node/internal/validators.mjs"; -const previewEntries = (iter, isKeyValue) => { - if (isKeyValue) { - const arr = [...iter]; - if (Array.isArray(arr[0]) && arr[0].length === 2) { - return [[].concat(...arr), true]; - } - return [arr, false]; - } else { - return [...iter]; - } -}; +import { previewEntries } from "ext:deno_node/internal_binding/util.ts"; import { Buffer } from "node:buffer"; const { isBuffer } = Buffer; import { @@ -475,7 +465,6 @@ const consoleMethods = { // https://console.spec.whatwg.org/#table table(tabularData, properties) { - console.log("tabularData", tabularData); if (properties !== undefined) { validateArray(properties, "properties"); } -- cgit v1.2.3