Skip to content

Commit

Permalink
Merge pull request #1131 from AprilArcus/april/1130
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Sep 28, 2022
2 parents 44fe613 + 8bd8508 commit 3172ef6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/core-js/internals/function-uncurry-this.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ var call = FunctionPrototype.call;
var uncurryThis = NATIVE_BIND && bind.bind(call, call);

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

0 comments on commit 3172ef6

Please sign in to comment.