From b96ad5b37f13d73fcc8ef7b66b7d86cc62538b54 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 20 Jan 2022 18:26:36 +0100 Subject: [PATCH] :lipstick: Minor cosmetic change on get-parents fn. --- common/src/app/common/pages/helpers.cljc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/pages/helpers.cljc b/common/src/app/common/pages/helpers.cljc index 4fd822eca..5cefcd4ae 100644 --- a/common/src/app/common/pages/helpers.cljc +++ b/common/src/app/common/pages/helpers.cljc @@ -137,9 +137,8 @@ (defn get-parents [shape-id objects] - (let [{:keys [parent-id]} (get objects shape-id)] - (when parent-id - (lazy-seq (cons parent-id (get-parents parent-id objects)))))) + (when-let [parent-id (->> shape-id (get objects) :parent-id)] + (lazy-seq (cons parent-id (get-parents parent-id objects))))) (defn get-frame "Get the frame that contains the shape. If the shape is already a frame, get itself."