🐛 Fix wrong mapcat call in collect-main-shapes

`(mapcat collect-main-shapes children objects)` passes `objects` as a
second parallel collection instead of threading it as the second
argument to `collect-main-shapes` for each child. Fix by using an
anonymous fn: `(mapcat #(collect-main-shapes % objects) children)`.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
Andrey Antukh 2026-04-14 12:35:21 +00:00
parent 8253738f01
commit 8b08c8ecc9

View File

@ -441,7 +441,7 @@
(if (ctk/main-instance? shape)
[shape]
(if-let [children (cfh/get-children objects (:id shape))]
(mapcat collect-main-shapes children objects)
(mapcat #(collect-main-shapes % objects) children)
[])))
(defn get-component-from-shape