🐛 sync getOwnPropertyDescriptor trap logic of legacy sandbox from proxy sandbox (#1156)
This commit is contained in:
parent
757a8fdc23
commit
2b63bcde91
|
|
@ -124,7 +124,12 @@ export default class SingularProxySandbox implements SandBox {
|
|||
},
|
||||
|
||||
getOwnPropertyDescriptor(_: Window, p: PropertyKey): PropertyDescriptor | undefined {
|
||||
return Object.getOwnPropertyDescriptor(rawWindow, p);
|
||||
const descriptor = Object.getOwnPropertyDescriptor(rawWindow, p);
|
||||
// A property cannot be reported as non-configurable, if it does not exists as an own property of the target object
|
||||
if (descriptor && !descriptor.configurable) {
|
||||
descriptor.configurable = true;
|
||||
}
|
||||
return descriptor;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user