File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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
2929 }
3030 const magicKey = Math . random ( ) + '' ;
3131 let module : { BuiltinModule : any } | undefined ;
32+ let ObjectPrototype : { } = Blob ;
33+ for ( let next ; ( next = Reflect . getPrototypeOf ( ObjectPrototype ) ) ; ObjectPrototype = next ) ;
3234 try {
3335 const kClone = Object . getOwnPropertySymbols ( Blob . prototype ) . find (
3436 ( e ) => e . description ?. includes ( 'clone' ) ,
3537 ) ! ;
36- Object . defineProperty ( Object . prototype , magicKey , {
38+ Object . defineProperty ( ObjectPrototype , magicKey , {
3739 get ( ) {
3840 module = this ;
3941 throw null ;
@@ -50,7 +52,7 @@ export let getBuiltinModule: null | ((id: string) => object | undefined) = funct
5052 } ) ( [ ] ) ,
5153 ) ;
5254 } catch { }
53- delete ( Object . prototype as any ) [ magicKey ] ;
55+ delete ( ObjectPrototype as any ) [ magicKey ] ;
5456 if ( module ) {
5557 getBuiltinModule = createFallbackGetBuiltinModule ( module . BuiltinModule ) ;
5658 } else {
You can’t perform that action at this time.
0 commit comments