From f3e7f042b42c461d88fe7bfeae880529931ef1c9 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Sat, 26 Aug 2023 14:53:39 -0500 Subject: [PATCH] fix reading signals outside of the vdom --- packages/signals/src/effect.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/signals/src/effect.rs b/packages/signals/src/effect.rs index 1a42c227f..9a54188d9 100644 --- a/packages/signals/src/effect.rs +++ b/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 } } }