Explorar o código

fix reading signals outside of the vdom

Evan Almloff hai 1 ano
pai
achega
f3e7f042b4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/signals/src/effect.rs

+ 2 - 1
packages/signals/src/effect.rs

@@ -18,7 +18,8 @@ pub(crate) fn get_effect_stack() -> EffectStack {
         Some(rt) => rt,
         None => {
             let store = EffectStack::default();
-            provide_root_context(store).expect("in a virtual dom")
+            provide_root_context(store.clone());
+            store
         }
     }
 }