Browse Source

fix: Proxy.has must see inherited keys per spec

tophf 4 years ago
parent
commit
52b623cf3d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/injected/web/gm-global-wrapper.js

+ 1 - 1
src/injected/web/gm-global-wrapper.js

@@ -208,7 +208,7 @@ export function makeGlobalWrapper(local) {
       }
       return desc;
     },
-    has: (_, name) => name === 'undefined' || name in local || globals.has(name),
+    has: (_, name) => name in local || name in inheritedKeys || globals.has(name),
     ownKeys: () => makeOwnKeys(local, globals),
     preventExtensions() {},
     set(_, name, value) {