diff --git a/src/context/context.ts b/src/context/context.ts index 959a1d8f2..872088615 100644 --- a/src/context/context.ts +++ b/src/context/context.ts @@ -159,7 +159,8 @@ const BLOCKED_SCOPE_KEYS: ReadonlySet = new Set(['__proto__', 'cons export function readJSProperty (obj: Scope, key: PropertyKey, ownPropertyOnly: boolean) { if (BLOCKED_SCOPE_KEYS.has(key)) { - if (ownPropertyOnly || !hasOwnProperty.call(obj, key)) return undefined + if (!hasOwnProperty.call(obj, key)) return undefined + if (ownPropertyOnly) return undefined } if (ownPropertyOnly && !hasOwnProperty.call(obj, key) && !(obj instanceof Drop)) return undefined return obj[key]