From 51ab11e91ecbe1ca5dab23e4157a7ce571840d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 12 Sep 2023 09:43:30 +0200 Subject: [PATCH] :bug: Use helper to normalice behavior of component display in dump_tree --- common/src/app/common/types/file.cljc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/common/src/app/common/types/file.cljc b/common/src/app/common/types/file.cljc index 85660994d2..5e5c4307a4 100644 --- a/common/src/app/common/types/file.cljc +++ b/common/src/app/common/types/file.cljc @@ -645,17 +645,13 @@ (str " #" (when show-ids (str/format " [Component %s]" (:component-id shape)))) "") (let [root-shape (ctn/get-component-shape objects shape) - component-id (when root-shape (:component-id root-shape)) component-file-id (when root-shape (:component-file root-shape)) component-file (when component-file-id (get libraries component-file-id nil)) - component (when component-id - (if component-file - (ctkl/get-component (:data component-file) component-id true) - (ctkl/get-component (:data file) component-id true))) - component-shape (when component - (if component-file - (get-ref-shape (:data component-file) component shape) - (get-ref-shape (:data file) component shape)))] + component-shape (find-ref-shape file + {:objects objects} + libraries + shape + :include-deleted? true)] (str/format " %s--> %s%s%s%s%s" (cond (:component-root shape) "#"