From 54f04c9141c3acf7cdca2d3d1ebb5b8c4f98e478 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Thu, 29 Sep 2016 11:12:49 +0200 Subject: [PATCH] Fix ESLint issues --- js/class.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/js/class.js b/js/class.js index b1793f16..9d04944e 100644 --- a/js/class.js +++ b/js/class.js @@ -25,24 +25,22 @@ for (var name in prop) { // Check if we're overwriting an existing function prototype[name] = typeof prop[name] == "function" && - typeof _super[name] == "function" && fnTest.test(prop[name]) ? - (function(name, fn) { - return function() { - var tmp = this._super; + typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn) { + return function() { + var tmp = this._super; - // Add a new ._super() method that is the same method - // but on the super-class - this._super = _super[name]; + // Add a new ._super() method that is the same method + // but on the super-class + this._super = _super[name]; - // The method only need to be bound temporarily, so we - // remove it when we're done executing - var ret = fn.apply(this, arguments); - this._super = tmp; + // The method only need to be bound temporarily, so we + // remove it when we're done executing + var ret = fn.apply(this, arguments); + this._super = tmp; - return ret; - }; - })(name, prop[name]) : - prop[name]; + return ret; + }; + })(name, prop[name]) : prop[name]; } // The dummy class constructor