File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1076,14 +1076,15 @@ if (typeof OriginalCallSite === 'function') {
1076
1076
( function setupCallSite ( ) {
1077
1077
for ( let i = 0 ; i < callSiteGetters . length ; i ++ ) {
1078
1078
const name = callSiteGetters [ i ] . name ;
1079
+ const funcProp = Object . getOwnPropertyDescriptor ( OriginalCallSite . prototype , name ) ;
1080
+ if ( funcProp === undefined ) continue ;
1079
1081
const propertyName = callSiteGetters [ i ] . propName ;
1080
1082
const func = { func ( ) {
1081
1083
return this [ propertyName ] ;
1082
1084
} } . func ;
1083
1085
const nameProp = Object . getOwnPropertyDescriptor ( func , 'name' ) ;
1084
1086
nameProp . value = name ;
1085
1087
Object . defineProperty ( func , 'name' , nameProp ) ;
1086
- const funcProp = Object . getOwnPropertyDescriptor ( OriginalCallSite . prototype , name ) ;
1087
1088
funcProp . value = func ;
1088
1089
Object . defineProperty ( CallSite . prototype , name , funcProp ) ;
1089
1090
}
You can’t perform that action at this time.
0 commit comments