From 2144ade7eb41b9a7e90e4deff59ac5f6dfd256cc Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 3 Aug 2018 11:21:31 -0300 Subject: Don't crash when an empty group is played --- ui.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 1500ad7..970adbf 100644 --- a/ui.js +++ b/ui.js @@ -542,6 +542,11 @@ class AppElement extends FocusElement { item = flattenGrouplike(item).items[0] } + // If there is no item (e.g. an empty group), well.. don't do anything. + if (!item) { + return + } + playTrack: { // No downloader argument? That's no good - stop here. // TODO: An error icon on this item, or something??? -- cgit 1.3.0-6-gf8a5