0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-01 09:31:26 -05:00

🐛 Protect against syncing with a not existing component

This commit is contained in:
Andrés Moya 2021-01-22 14:36:22 +01:00
parent e4eaa74b51
commit b0ea9d3096

View file

@ -476,14 +476,16 @@
root-inst shape-inst
root-master (cp/get-component-root component)]
(generate-sync-shape-direct-recursive container
shape-inst
component
shape-master
root-inst
root-master
reset?
initial-root?)))
(if component
(generate-sync-shape-direct-recursive container
shape-inst
component
shape-master
root-inst
root-master
reset?
initial-root?)
empty-changes)))
(defn- generate-sync-shape-direct-recursive
[container shape-inst component shape-master root-inst root-master reset? initial-root?]
@ -591,13 +593,15 @@
root-inst shape-inst
root-master (cp/get-component-root component)]
(generate-sync-shape-inverse-recursive container
shape-inst
component
shape-master
root-inst
root-master
initial-root?)))
(if component
(generate-sync-shape-inverse-recursive container
shape-inst
component
shape-master
root-inst
root-master
initial-root?)
empty-changes)))
(defn- generate-sync-shape-inverse-recursive
[container shape-inst component shape-master root-inst root-master initial-root?]