0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

🐛 Fix error instantiating a component

This commit is contained in:
Andrés Moya 2022-02-10 12:27:44 +01:00
parent 93174f54a3
commit bea3699451

View file

@ -209,9 +209,9 @@
"Retrieve a component from libraries, if no library-id is provided, we
iterate over all libraries and find the component on it."
([libraries component-id]
(some #(-> % :components (get component-id)) (vals libraries)))
(some #(-> % :data :components (get component-id)) (vals libraries)))
([libraries library-id component-id]
(get-in libraries [library-id :components component-id])))
(get-in libraries [library-id :data :components component-id])))
(defn ^boolean is-main-of?
[shape-main shape-inst]