mirror of
https://github.com/penpot/penpot.git
synced 2025-05-06 10:45:54 +02: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:
commit
230e011003
1 changed files with 5 additions and 1 deletions
|
@ -275,7 +275,11 @@
|
||||||
preview-blend (-> refs/workspace-preview-blend
|
preview-blend (-> refs/workspace-preview-blend
|
||||||
(mf/deref))]
|
(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)]
|
(when-let [canvas (mf/ref-val canvas-ref)]
|
||||||
(->> wasm.api/module
|
(->> wasm.api/module
|
||||||
(p/fmap (fn [ready?]
|
(p/fmap (fn [ready?]
|
||||||
|
|
Loading…
Add table
Reference in a new issue