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

fix(timestamp): clear editing state before setting timestamp

If editing state is on in other block, submitting the timestamp to
current block will also add a timestamp to the block.
leizhe 4 лет назад
Родитель
Сommit
2694568f70
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/main/frontend/components/datetime.cljs

+ 1 - 1
src/main/frontend/components/datetime.cljs

@@ -108,10 +108,10 @@
                                      block-id (or (:block/uuid (state/get-edit-block))
                                                   (:block/uuid block))
                                      typ (or @commands/*current-command typ)]
+                                 (state/clear-edit!)
                                  (editor-handler/set-block-timestamp! block-id
                                                                       typ
                                                                       text)
-                                 (state/clear-edit!)
                                  (when show?
                                    (reset! show? false))))
                              (clear-timestamp!)