fix: paste err when copied-blocks is nil

This commit is contained in:
rcmerci
2021-04-15 13:24:35 +08:00
parent 2582a99532
commit 318a6bce86

View File

@@ -2264,8 +2264,10 @@
file (:block/file page)
copied-blocks (state/get-copied-blocks)
copied-block-tree (:copy/block-tree copied-blocks)]
(when (and (not (string/blank? text))
(= (string/trim text) (string/trim (:copy/content copied-blocks))))
(when (and
copied-blocks
(not (string/blank? text))
(= (string/trim text) (string/trim (:copy/content copied-blocks))))
;; copy from logseq internally
(let [editing-block (state/get-edit-block)
parent (:block/parent editing-block)