Add isEmpty function to ItemList (#1218)

* Add isEmpty function to ItemList

* Fix coding style to be consistent.

* Recompiled app.js for both js/admin/ and js/forum/
This commit is contained in:
zinsserzh
2017-08-09 19:07:00 -07:00
committed by Toby Zerner
parent c037658675
commit 7df9594a04
3 changed files with 42 additions and 4 deletions

15
js/admin/dist/app.js vendored
View File

@ -23425,14 +23425,25 @@ System.register("flarum/utils/ItemList", [], function (_export, _context) {
}
/**
* Check whether an item is present in the list.
* Check whether the list is empty.
*
* @param key
* @returns {boolean}
* @public
*/
babelHelpers.createClass(ItemList, [{
key: "isEmpty",
value: function isEmpty() {
for (var i in this.items) {
if (this.items.hasOwnProperty(i)) {
return false;
}
}
return true;
}
}, {
key: "has",
value: function has(key) {
return !!this.items[key];