From 9cbbe1565d22acc7c58646e20ed386336f019262 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Wed, 10 Apr 2024 15:53:52 +0200 Subject: [PATCH] :bug: Fix crash on copy paste a orphan copy inside a copy --- common/src/app/common/types/file.cljc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/types/file.cljc b/common/src/app/common/types/file.cljc index 12775f322..0c5fbf572 100644 --- a/common/src/app/common/types/file.cljc +++ b/common/src/app/common/types/file.cljc @@ -219,11 +219,11 @@ (defn advance-shape-ref "Get the shape-ref of the near main of the shape, recursively repeated as many times as the given levels." - [file container libraries shape levels & options] - (let [ref-shape (find-ref-shape file container libraries shape options)] + [file container libraries shape levels & {:keys [include-deleted?] :or {include-deleted? false}}] + (let [ref-shape (find-ref-shape file container libraries shape :include-deleted? include-deleted? :with-context? true)] (if (or (nil? (:shape-ref ref-shape)) (not (pos? levels))) (:id ref-shape) - (advance-shape-ref file container libraries ref-shape (dec levels) options)))) + (advance-shape-ref file (:container (meta ref-shape)) libraries ref-shape (dec levels) :include-deleted? include-deleted?)))) (defn find-ref-component "Locate the nearest component in the local file or libraries that is referenced by the