diff options
author | Florrie <towerofnix@gmail.com> | 2018-09-15 15:47:48 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-09-15 15:47:49 -0300 |
commit | d046cf893c1869cd529025808f4c089f6b7dfa94 (patch) | |
tree | 5febc944eaf78402b1fdab28a6908d972aa6a7ba | |
parent | 9e1384ee97d24673d151bd39778eba5273a94f3a (diff) |
Don't crash when passing playlists
This happened when the openPlaylistDialog was closed before being opened - Dialog.close would try to select(this.oldSelectedElement), but of course that would be undefined since the dialog had never been opened in the first place.
-rw-r--r-- | ui.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui.js b/ui.js index 755d95f..aaa877a 100644 --- a/ui.js +++ b/ui.js @@ -231,7 +231,10 @@ class AppElement extends FocusElement { } async handlePlaylistSource(source, newTab = false) { - this.openPlaylistDialog.close() + if (this.openPlaylistDialog.visible) { + this.openPlaylistDialog.close() + } + this.alertDialog.showMessage('Opening playlist...', false) let grouplike |