« get me outta code hell

don't explode without metadata lol - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-05-16 17:50:10 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-16 22:29:28 -0300
commit7d3f9637d7e7eecab7ea3f0707541f664e7d0593 (patch)
treecf7aa231f0f9284958549ebd4752e40ecb3324c0
parentbb96788a3ab48776229985ca0a02f9c5c124b65a (diff)
don't explode without metadata lol rebased-socket-mtui
-rw-r--r--backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend.js b/backend.js
index ffa620a..d7d7678 100644
--- a/backend.js
+++ b/backend.js
@@ -791,7 +791,7 @@ export default class Backend extends EventEmitter {
     queuePlayer.on('playing', track => {
       if (track) {
         const metadata = this.getMetadataFor(track)
-        queuePlayer.setDuration(metadata.duration)
+        queuePlayer.setDuration(metadata?.duration)
       }
     })