From 81d90be4c9ade21decb27d49eb09faa14aa31690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Torr=C3=B3?= Date: Wed, 18 Mar 2026 16:04:04 +0100 Subject: [PATCH] :bug: Fix rasterizer initialization to only run when render-wasm/v1 is active (#8669) --- frontend/src/app/main.cljs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main.cljs b/frontend/src/app/main.cljs index 7bf4afecc7..68dfb71e51 100644 --- a/frontend/src/app/main.cljs +++ b/frontend/src/app/main.cljs @@ -58,6 +58,14 @@ [] (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 [] (ptk/reify ::initialize @@ -93,12 +101,12 @@ (rx/map deref) (rx/filter dp/is-authenticated?) (rx/take 1) - (rx/map #(ws/initialize))))) + (rx/map #(ws/initialize))) - ptk/EffectEvent - (effect [_ state _] - (when-not (feat/active-feature? state "render-wasm/v1") - (thr/init!))))) + (->> stream + (rx/filter (ptk/type? ::feat/initialize)) + (rx/take 1) + (rx/map #(initialize-rasterizer))))))) (defn ^:export init [options]