mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Fix ESLint issues
This commit is contained in:
parent
fc0c706100
commit
54f04c9141
28
js/class.js
28
js/class.js
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user