Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Sep 27, 2022
1 parent 7451b1d commit 775f6ba
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/core-js/internals/function-uncurry-this.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
var fails = require('../internals/fails');
var NATIVE_BIND = require('../internals/function-bind-native');

var FunctionPrototype = Function.prototype;
Expand All @@ -8,10 +7,7 @@ var uncurryThis = NATIVE_BIND && bind.bind(call, call);

module.exports = function (fn) {
// Nashorn bug, https://github.com/zloirock/core-js/issues/1128
var isNativeFunction = fn instanceof Function;
return (isNativeFunction && NATIVE_BIND)
? uncurryThis(fn)
: function () {
return call.apply(fn, arguments);
};
return fn && (NATIVE_BIND && fn instanceof Function ? uncurryThis(fn) : function () {
return call.apply(fn, arguments);
});
};

0 comments on commit 775f6ba

Please sign in to comment.