mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
one last indentation fix
This commit is contained in:
parent
3961dbcf55
commit
a59df5b04d
1 changed files with 21 additions and 21 deletions
|
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue