From 9273ee83f2e04063890e002fbc15263ef2fcd378 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Thu, 13 May 2021 20:07:02 +0800 Subject: [PATCH] fix: exclude built-in properties when comparing content --- src/main/frontend/handler/editor.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index bb5d5da82..250af9157 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -354,12 +354,13 @@ ([block value {:keys [force?] :as opts}] - (let [{:block/keys [uuid content file page format repo content properties]} block + (let [{:block/keys [uuid file page format repo content properties]} block repo (or repo (state/get-current-repo)) e (db/entity repo [:block/uuid uuid]) format (or format (state/get-preferred-format)) page (db/entity repo (:db/id page)) - block-id (when (map? properties) (get properties :id))] + block-id (when (map? properties) (get properties :id)) + content (text/remove-built-in-properties! format content)] (cond (another-block-with-same-id-exists? uuid block-id) (notification/show!