Fix ESLint issues

This commit is contained in:
Michael Teeuw 2016-09-29 11:12:49 +02:00
parent fc0c706100
commit 54f04c9141

View File

@ -25,24 +25,22 @@
for (var name in prop) { for (var name in prop) {
// Check if we're overwriting an existing function // Check if we're overwriting an existing function
prototype[name] = typeof prop[name] == "function" && prototype[name] = typeof prop[name] == "function" &&
typeof _super[name] == "function" && fnTest.test(prop[name]) ? typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn) {
(function(name, fn) { return function() {
return function() { var tmp = this._super;
var tmp = this._super;
// Add a new ._super() method that is the same method // Add a new ._super() method that is the same method
// but on the super-class // but on the super-class
this._super = _super[name]; this._super = _super[name];
// The method only need to be bound temporarily, so we // The method only need to be bound temporarily, so we
// remove it when we're done executing // remove it when we're done executing
var ret = fn.apply(this, arguments); var ret = fn.apply(this, arguments);
this._super = tmp; this._super = tmp;
return ret; return ret;
}; };
})(name, prop[name]) : })(name, prop[name]) : prop[name];
prop[name];
} }
// The dummy class constructor // The dummy class constructor