Browse Source

fix: safe q

Tienson Qin 3 years ago
parent
commit
b7b5f6d25c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/components/editor.cljs

+ 2 - 1
src/main/frontend/components/editor.cljs

@@ -234,7 +234,8 @@
   [id]
   (let [input (gdom/getElement id)]
     (when input
-      (let [q (:searching-property (editor-handler/get-searching-property input))
+      (let [q (or (:searching-property (editor-handler/get-searching-property input))
+                  "")
             matched-properties (editor-handler/get-matched-properties q)
             q-property (string/replace (string/lower-case q) #"\s+" "-")
             non-exist-handler (fn [_state]