Просмотр исходного кода

fix: plugin api moveBlock not working

hyrijk 4 лет назад
Родитель
Сommit
5913ade4da
1 измененных файлов с 1 добавлено и 1 удалено
  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]
   (let [top? (= move-to :top)
         nested? (= move-to :nested)
-        alt-key? (.-altKey event)
+        alt-key? (and event (.-altKey event))
         repo (state/get-current-repo)]
     (cond
       alt-key?