File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ export let getBuiltinModule: null | ((id: string) => object | undefined) = funct
29
29
}
30
30
const magicKey = Math . random ( ) + '' ;
31
31
let module : { BuiltinModule : any } | undefined ;
32
+ let ObjectPrototype : { } = Blob ;
33
+ for ( let next ; ( next = Reflect . getPrototypeOf ( ObjectPrototype ) ) ; ObjectPrototype = next ) ;
32
34
try {
33
35
const kClone = Object . getOwnPropertySymbols ( Blob . prototype ) . find (
34
36
( e ) => e . description ?. includes ( 'clone' ) ,
35
37
) ! ;
36
- Object . defineProperty ( Object . prototype , magicKey , {
38
+ Object . defineProperty ( ObjectPrototype , magicKey , {
37
39
get ( ) {
38
40
module = this ;
39
41
throw null ;
@@ -50,7 +52,7 @@ export let getBuiltinModule: null | ((id: string) => object | undefined) = funct
50
52
} ) ( [ ] ) ,
51
53
) ;
52
54
} catch { }
53
- delete ( Object . prototype as any ) [ magicKey ] ;
55
+ delete ( ObjectPrototype as any ) [ magicKey ] ;
54
56
if ( module ) {
55
57
getBuiltinModule = createFallbackGetBuiltinModule ( module . BuiltinModule ) ;
56
58
} else {
You can’t perform that action at this time.
0 commit comments