From 1f043042100bc66a3f39ffa1c1f23b31c267e60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 29 Sep 2023 13:29:21 +0200 Subject: [PATCH] :sparkles: Add protection to fix script --- backend/src/app/srepl/fixes.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/app/srepl/fixes.clj b/backend/src/app/srepl/fixes.clj index 1125967c6..3014232c8 100644 --- a/backend/src/app/srepl/fixes.clj +++ b/backend/src/app/srepl/fixes.clj @@ -364,8 +364,10 @@ fix-touched-children (fn [shape] (let [matches? (fn [[child-id ref-child-id]] - (let [child (ctn/get-shape page child-id)] - (= (:shape-ref child) ref-child-id))) + (if child-id + (let [child (ctn/get-shape page child-id)] + (= (:shape-ref child) ref-child-id)) + false)) equal? (every? matches? (d/zip-all (:shapes shape) (:shapes ref-shape)))] (when (and (not equal?) (not (cph/touched-group? shape :shapes-group))) (println " -> set touched " (:name shape) (:id shape) :shapes :shapes-group))