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

🐛 Don't emit update-shape when no page-id.

This commit is contained in:
Andrey Antukh 2021-03-16 11:38:47 +01:00
parent f0087e11b0
commit ede42e42b1

View file

@ -77,7 +77,8 @@
(dissoc (:content shape) :children))] (dissoc (:content shape) :children))]
(rx/merge (rx/merge
(rx/of (update-editor-state shape nil)) (rx/of (update-editor-state shape nil))
(when (not= content (:content shape)) (when (and (not= content (:content shape))
(some? (:current-page-id state)))
(rx/of (dwc/update-shapes [id] #(assoc % :content content)))))) (rx/of (dwc/update-shapes [id] #(assoc % :content content))))))
(rx/of (dws/deselect-shape id) (rx/of (dws/deselect-shape id)
(dwc/delete-shapes [id]))))))) (dwc/delete-shapes [id])))))))