From f3aa03d214fec6365a617ceb153242293f9bb629 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Tue, 17 Jan 2023 10:28:39 +0800 Subject: [PATCH] fix --- src/editor/value_explorer.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/editor/value_explorer.js b/src/editor/value_explorer.js index f1de3be..c83116d 100644 --- a/src/editor/value_explorer.js +++ b/src/editor/value_explorer.js @@ -6,10 +6,18 @@ import {el, stringify, scrollIntoViewIfNeeded} from './domutils.js' + +// We test both for Object and globalThis.run_window.Object because objects may +// come both from run_window and current window (where they are created in +// metacircular interpreter const has_custom_toString = object => object.toString != globalThis.run_window.Object.prototype.toString + && + object.toString != Object.prototype.toString const isError = object => + object instanceof Error + || object instanceof globalThis.run_window.Error const isPromise = object =>