0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

Merge pull request #5353 from penpot/superalex-fix-change-page-with-wasm-render

🐛 Fix change page with wasm render
This commit is contained in:
Belén Albeza 2024-11-25 12:45:21 +01:00 committed by GitHub
commit 230e011003
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -275,7 +275,11 @@
preview-blend (-> refs/workspace-preview-blend
(mf/deref))]
(mf/with-effect []
;; NOTE: We need this page-id dependency to react to it and reset the
;; canvas, even though we are not using `page-id` inside the hook.
;; We think moving this out to a handler will make the render code
;; harder to follow through.
(mf/with-effect [page-id]
(when-let [canvas (mf/ref-val canvas-ref)]
(->> wasm.api/module
(p/fmap (fn [ready?]