mirror of
https://github.com/penpot/penpot.git
synced 2026-09-11 14:39:35 +00:00
🐛 Fix rasterizer initialization to only run when render-wasm/v1 is active (#8669)
This commit is contained in:
parent
a4ad940177
commit
81d90be4c9
@ -58,6 +58,14 @@
|
|||||||
[]
|
[]
|
||||||
(mf/render! app-root (mf/element ui/app)))
|
(mf/render! app-root (mf/element ui/app)))
|
||||||
|
|
||||||
|
(defn- initialize-rasterizer
|
||||||
|
[]
|
||||||
|
(ptk/reify ::initialize-rasterizer
|
||||||
|
ptk/EffectEvent
|
||||||
|
(effect [_ state _]
|
||||||
|
(when (feat/active-feature? state "render-wasm/v1")
|
||||||
|
(thr/init!)))))
|
||||||
|
|
||||||
(defn initialize
|
(defn initialize
|
||||||
[]
|
[]
|
||||||
(ptk/reify ::initialize
|
(ptk/reify ::initialize
|
||||||
@ -93,12 +101,12 @@
|
|||||||
(rx/map deref)
|
(rx/map deref)
|
||||||
(rx/filter dp/is-authenticated?)
|
(rx/filter dp/is-authenticated?)
|
||||||
(rx/take 1)
|
(rx/take 1)
|
||||||
(rx/map #(ws/initialize)))))
|
(rx/map #(ws/initialize)))
|
||||||
|
|
||||||
ptk/EffectEvent
|
(->> stream
|
||||||
(effect [_ state _]
|
(rx/filter (ptk/type? ::feat/initialize))
|
||||||
(when-not (feat/active-feature? state "render-wasm/v1")
|
(rx/take 1)
|
||||||
(thr/init!)))))
|
(rx/map #(initialize-rasterizer)))))))
|
||||||
|
|
||||||
(defn ^:export init
|
(defn ^:export init
|
||||||
[options]
|
[options]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user