diff --git a/common/src/app/common/files/repair.cljc b/common/src/app/common/files/repair.cljc index 29e6d4fdf5..ee327ab9e2 100644 --- a/common/src/app/common/files/repair.cljc +++ b/common/src/app/common/files/repair.cljc @@ -644,9 +644,11 @@ (fn [shape] ;; Set the desired swap slot (let [slot (:swap-slot args)] - (when (some? slot) - (log/debug :hint (str " -> set swap-slot to " slot)) - (ctk/set-swap-slot shape slot))))] + (if (some? slot) + (do + (log/debug :hint (str " -> set swap-slot to " slot)) + (ctk/set-swap-slot shape slot)) + shape)))] (log/dbg :hint "repairing shape :missing-slot" :id (:id shape) :name (:name shape) :page-id page-id) (-> (pcb/empty-changes nil page-id) diff --git a/common/src/app/common/files/validate.cljc b/common/src/app/common/files/validate.cljc index 1c16c4dcbc..a957c5746c 100644 --- a/common/src/app/common/files/validate.cljc +++ b/common/src/app/common/files/validate.cljc @@ -704,7 +704,8 @@ (defn- get-orphan-shapes [{:keys [objects] :as page}] - (let [xf (comp (map #(contains? objects (:parent-id %))) + (let [xf (comp (filter #(and (some? (:parent-id %)) + (not (contains? objects (:parent-id %))))) (map :id))] (into [] xf (vals objects))))