diff options
author | Florrie <towerofnix@gmail.com> | 2018-08-03 11:21:31 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-08-03 11:21:31 -0300 |
commit | 2144ade7eb41b9a7e90e4deff59ac5f6dfd256cc (patch) | |
tree | 03261d9c29cee2d443f0894d1f8dac3053736e91 | |
parent | 20b9ffb594c5cea5b90b1aa07c91764610b70100 (diff) |
Don't crash when an empty group is played
-rw-r--r-- | ui.js | 5 |
1 files changed, 5 insertions, 0 deletions
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??? |