« get me outta code hell

read timestamps as JSON when they start with [ - 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 <towerofnix@gmail.com>2021-08-06 18:30:05 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-08-06 18:30:05 -0300
commitb29f82bc0afca425bb42fecc0583e804701110dd (patch)
tree8cf294476d6666e95c65b604254ce331d2cbf25b
parent864b45520acae62962a10f335eab3950ed84c6fc (diff)
read timestamps as JSON when they start with [
...instead of {. lol
-rw-r--r--ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index f03c24b..594c6f8 100644
--- a/ui.js
+++ b/ui.js
@@ -1171,7 +1171,7 @@ class AppElement extends FocusElement {
       return null
     }
 
-    if (contents.startsWith('{')) {
+    if (contents.startsWith('[')) {
       try {
         return JSON.parse(contents)
       } catch (error) {