one last indentation fix

This commit is contained in:
Ryan Jones 2016-11-28 17:19:43 -08:00
parent 3961dbcf55
commit a59df5b04d

View file

@ -7,30 +7,30 @@
// //
if (!Function.prototype.bind) { if (!Function.prototype.bind) {
Function.prototype.bind = function(oThis) { Function.prototype.bind = function(oThis) {
if (typeof this !== 'function') { if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5 // closest thing possible to the ECMAScript 5
// internal IsCallable function // internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
} }
var aArgs = Array.prototype.slice.call(arguments, 1), var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this, fToBind = this,
fNOP = function() {}, fNOP = function() {},
fBound = function() { fBound = function() {
return fToBind.apply(this instanceof fNOP return fToBind.apply(this instanceof fNOP
? this ? this
: oThis, : oThis,
aArgs.concat(Array.prototype.slice.call(arguments))); aArgs.concat(Array.prototype.slice.call(arguments)));
}; };
if (this.prototype) { if (this.prototype) {
// Function.prototype doesn't have a prototype property // Function.prototype doesn't have a prototype property
fNOP.prototype = this.prototype; fNOP.prototype = this.prototype;
} }
fBound.prototype = new fNOP(); fBound.prototype = new fNOP();
return fBound; return fBound;
}; };
} }