mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
🐛 Fix "maximum call stack size exceeded" crash on variant
This commit is contained in:
parent
fe44c14bac
commit
5cbcec3db6
@ -362,24 +362,24 @@
|
|||||||
component (ctkl/get-component component-file (:component-id top-instance) true)
|
component (ctkl/get-component component-file (:component-id top-instance) true)
|
||||||
remote-shape (get-ref-shape component-file component shape)
|
remote-shape (get-ref-shape component-file component shape)
|
||||||
component-container (get-component-container component-file component)
|
component-container (get-component-container component-file component)
|
||||||
[remote-shape component-container]
|
[remote-shape component-container component-file]
|
||||||
(if (some? remote-shape)
|
(if (some? remote-shape)
|
||||||
[remote-shape component-container]
|
[remote-shape component-container component-file]
|
||||||
;; If not found, try the case of this being a fostered or swapped children
|
;; If not found, try the case of this being a fostered or swapped children
|
||||||
(let [head-instance (ctn/get-head-shape (:objects container) shape)
|
(let [head-instance (ctn/get-head-shape (:objects container) shape)
|
||||||
component-file (get-in libraries [(:component-file head-instance) :data])
|
component-file (get-in libraries [(:component-file head-instance) :data])
|
||||||
head-component (ctkl/get-component component-file (:component-id head-instance) true)
|
head-component (ctkl/get-component component-file (:component-id head-instance) true)
|
||||||
remote-shape' (get-ref-shape component-file head-component shape)
|
remote-shape' (get-ref-shape component-file head-component shape)
|
||||||
component-container (get-component-container component-file component)]
|
component-container' (get-component-container component-file head-component)]
|
||||||
[remote-shape' component-container]))]
|
[remote-shape' component-container' component-file]))]
|
||||||
|
|
||||||
(if (nil? remote-shape)
|
(if (nil? remote-shape)
|
||||||
nil
|
nil
|
||||||
(if (nil? (:shape-ref remote-shape))
|
(if (nil? (:shape-ref remote-shape))
|
||||||
(cond-> remote-shape
|
(cond-> remote-shape
|
||||||
(and remote-shape with-context?)
|
(and remote-shape with-context?)
|
||||||
(with-meta {:file {:id (:id file-data)
|
(with-meta {:file {:id (:id component-file)
|
||||||
:data file-data}
|
:data component-file}
|
||||||
:container component-container}))
|
:container component-container}))
|
||||||
(find-remote-shape component-container libraries remote-shape :with-context? with-context?)))))
|
(find-remote-shape component-container libraries remote-shape :with-context? with-context?)))))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user