mirror of
https://github.com/penpot/penpot.git
synced 2025-05-05 21:27:29 +02:00
🐛 Protect against syncing with a not existing component
This commit is contained in:
parent
e4eaa74b51
commit
b0ea9d3096
1 changed files with 19 additions and 15 deletions
|
@ -476,6 +476,7 @@
|
||||||
root-inst shape-inst
|
root-inst shape-inst
|
||||||
root-master (cp/get-component-root component)]
|
root-master (cp/get-component-root component)]
|
||||||
|
|
||||||
|
(if component
|
||||||
(generate-sync-shape-direct-recursive container
|
(generate-sync-shape-direct-recursive container
|
||||||
shape-inst
|
shape-inst
|
||||||
component
|
component
|
||||||
|
@ -483,7 +484,8 @@
|
||||||
root-inst
|
root-inst
|
||||||
root-master
|
root-master
|
||||||
reset?
|
reset?
|
||||||
initial-root?)))
|
initial-root?)
|
||||||
|
empty-changes)))
|
||||||
|
|
||||||
(defn- generate-sync-shape-direct-recursive
|
(defn- generate-sync-shape-direct-recursive
|
||||||
[container shape-inst component shape-master root-inst root-master reset? initial-root?]
|
[container shape-inst component shape-master root-inst root-master reset? initial-root?]
|
||||||
|
@ -591,13 +593,15 @@
|
||||||
root-inst shape-inst
|
root-inst shape-inst
|
||||||
root-master (cp/get-component-root component)]
|
root-master (cp/get-component-root component)]
|
||||||
|
|
||||||
|
(if component
|
||||||
(generate-sync-shape-inverse-recursive container
|
(generate-sync-shape-inverse-recursive container
|
||||||
shape-inst
|
shape-inst
|
||||||
component
|
component
|
||||||
shape-master
|
shape-master
|
||||||
root-inst
|
root-inst
|
||||||
root-master
|
root-master
|
||||||
initial-root?)))
|
initial-root?)
|
||||||
|
empty-changes)))
|
||||||
|
|
||||||
(defn- generate-sync-shape-inverse-recursive
|
(defn- generate-sync-shape-inverse-recursive
|
||||||
[container shape-inst component shape-master root-inst root-master initial-root?]
|
[container shape-inst component shape-master root-inst root-master initial-root?]
|
||||||
|
|
Loading…
Add table
Reference in a new issue