File tree 1 file changed +10
-4
lines changed
packages/core-js/internals
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,14 @@ var call = FunctionPrototype.call;
6
6
var uncurryThis = NATIVE_BIND && bind . bind ( call , call ) ;
7
7
8
8
module . exports = function ( fn ) {
9
- // Nashorn bug, https://github.com/zloirock/core-js/issues/1128
10
- return fn && ( NATIVE_BIND && fn instanceof Function ? uncurryThis ( fn ) : function ( ) {
11
- return call . apply ( fn , arguments ) ;
12
- } ) ;
9
+ var isNativeFunction = fn instanceof Function ;
10
+ // Nashorn bug:
11
+ // https://github.com/zloirock/core-js/issues/1128
12
+ // https://github.com/zloirock/core-js/issues/1130
13
+ if ( ! isNativeFunction ) return ;
14
+ return NATIVE_BIND
15
+ ? uncurryThis ( fn )
16
+ : function ( ) {
17
+ return call . apply ( fn , arguments ) ;
18
+ } ;
13
19
} ;
You can’t perform that action at this time.
0 commit comments