mirror of https://github.com/penpot/penpot.git
🐛 Fix object added in different page (#7988)
This commit is contained in:
parent
737eceda3a
commit
5780a43fe0
|
|
@ -270,8 +270,12 @@
|
|||
(ptk/reify ::process-wasm-object
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(let [objects (dsh/lookup-page-objects state)]
|
||||
(wasm.api/process-object (get objects id))))))
|
||||
(let [objects (dsh/lookup-page-objects state)
|
||||
shape (get objects id)]
|
||||
;; Only process objects that exist in the current page
|
||||
;; This prevents errors when processing changes from other pages
|
||||
(when shape
|
||||
(wasm.api/process-object shape))))))
|
||||
|
||||
(defn initialize-workspace
|
||||
[team-id file-id]
|
||||
|
|
|
|||
Loading…
Reference in New Issue