From 36332b26b37f3c611d991e83ec5b17ab2a8af082 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 23 Dec 2018 00:01:23 -0400 Subject: Show "unnamed" in "this group:" (and its menu) --- ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index dfb75ae..f5880df 100644 --- a/ui.js +++ b/ui.js @@ -254,7 +254,7 @@ class AppElement extends FocusElement { items: [ // A label that just shows some brief information about the item. isGroup && {label: - `("${item.name}" -` + + `(${item.name ? `"${item.name}"` : 'Unnamed'} -` + ` ${item.items.length} item${item.items.length === 1 ? '' : 's'}` + `, ${countTotalItems(item)} total` + ')'}, @@ -976,7 +976,7 @@ class GrouplikeListingElement extends Form { // within any groups (so you can't bworse a parent and access its menu // from there). if (!this.grouplike.isTheQueue) { - const ownElement = new BasicGrouplikeItemElement(`This group: ${this.grouplike.name}`) + const ownElement = new BasicGrouplikeItemElement(`This group: ${this.grouplike.name || '(Unnamed group)'}`) ownElement.item = this.grouplike ownElement.recordStore = this.recordStore ownElement.isGroup = true -- cgit 1.3.0-6-gf8a5