Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
PrototypeJS: do not override bind method if already native version.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 7, 2015
1 parent 69c4856 commit b54a168
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -441,16 +441,19 @@ Object.extend(Function.prototype, (function() {
};
}

return {
var res = {
argumentNames: argumentNames,
bind: bind,
bindAsEventListener: bindAsEventListener,
curry: curry,
delay: delay,
defer: defer,
wrap: wrap,
methodize: methodize
};
if(!Function.prototype.bind){
res['bind'] = bind;
}
return res;
})());


Expand Down

0 comments on commit b54a168

Please sign in to comment.