Przeglądaj źródła

fix: plugin api moveBlock not working

hyrijk 4 lat temu
rodzic
commit
5913ade4da
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/main/frontend/handler/dnd.cljs

+ 1 - 1
src/main/frontend/handler/dnd.cljs

@@ -35,7 +35,7 @@
   [^js event current-block target-block move-to]
   [^js event current-block target-block move-to]
   (let [top? (= move-to :top)
   (let [top? (= move-to :top)
         nested? (= move-to :nested)
         nested? (= move-to :nested)
-        alt-key? (.-altKey event)
+        alt-key? (and event (.-altKey event))
         repo (state/get-current-repo)]
         repo (state/get-current-repo)]
     (cond
     (cond
       alt-key?
       alt-key?