fix: edit block could be nil because async insert

This commit is contained in:
Tienson Qin
2021-04-16 22:56:48 +08:00
parent 238b180424
commit ba0f6bd734
2 changed files with 5 additions and 5 deletions

View File

@@ -211,7 +211,7 @@
:or {tail-len 0}}]
(when-not config/publishing?
(when-let [block-id (:block/uuid block)]
(let [block (db/pull [:block/uuid block-id])
(let [block (or (db/pull [:block/uuid block-id]) block)
edit-input-id (if (uuid? id)
(get-edit-input-id-with-block-id id)
(str (subs id 0 (- (count id) 36)) block-id))