From eb62704eeeedf6cba3b7fbc330967125a59a52e3 Mon Sep 17 00:00:00 2001 From: webreflection Date: Tue, 21 Nov 2023 14:35:33 +0100 Subject: [PATCH] Fixed the length --- esm/shared/thread.js | 2 +- test/issue-34/worker.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/esm/shared/thread.js b/esm/shared/thread.js index c09538a..ccd3880 100644 --- a/esm/shared/thread.js +++ b/esm/shared/thread.js @@ -161,7 +161,7 @@ export default name => { const global = new Proxy(pair(OBJECT, null), proxyHandler); - // this is needed to avoid confusion when new Proxy({type, value}) + // this is needed to avoid confusion when Proxy of {type, value} // passes through `isArray` check, as that would return always true // by specs and there's no Proxy trap to avoid it. const remoteArray = global.Array[isArray]; diff --git a/test/issue-34/worker.js b/test/issue-34/worker.js index c1cf945..e84600d 100644 --- a/test/issue-34/worker.js +++ b/test/issue-34/worker.js @@ -3,6 +3,7 @@ const { window } = coincident(self); const { array, object } = window; +console.log(Array.isArray(array)); console.log(Object.keys(array), [...array]); array.push(4); console.log(Object.keys(array), [...array]);