Parcourir la source

comment on setTimeout in undo

Tienson Qin il y a 2 ans
Parent
commit
047653bd97
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/main/frontend/handler/history.cljs

+ 1 - 0
src/main/frontend/handler/history.cljs

@@ -46,6 +46,7 @@
   (let [{:keys [editor-cursor app-state]} (undo-redo/undo)]
     (restore-cursor! editor-cursor)
     (restore-app-state! app-state))
+  ;; ugly timeout: avoid save block from frontend.handler.editor.lifecycle/will-unmount
   (js/setTimeout #(state/set-editor-op! nil) 100))
 
 (defn redo!