mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update luci-base
This commit is contained in:
parent
0291791eed
commit
56382b4306
4 changed files with 75 additions and 32 deletions
|
|
@ -23,6 +23,20 @@
|
|||
});
|
||||
}
|
||||
|
||||
/* Promise.finally polyfill */
|
||||
if (typeof Promise.prototype.finally !== 'function') {
|
||||
Promise.prototype.finally = function(fn) {
|
||||
var onFinally = function(cb) {
|
||||
return Promise.resolve(fn.call(this)).then(cb);
|
||||
};
|
||||
|
||||
return this.then(
|
||||
function(result) { return onFinally.call(this, function() { return result }) },
|
||||
function(reason) { return onFinally.call(this, function() { return Promise.reject(reason) }) }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* Class declaration and inheritance helper
|
||||
*/
|
||||
|
|
@ -1174,6 +1188,14 @@
|
|||
return null;
|
||||
|
||||
return inst[method].apply(inst, inst.varargs(arguments, 2));
|
||||
},
|
||||
|
||||
isEmpty: function(node) {
|
||||
for (var child = node.firstElementChild; child != null; child = child.nextElementSibling)
|
||||
if (!child.classList.contains('hidden'))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue