From 2d5a4f82bf645672370b4154caeac2aa81487844 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Sun, 13 Aug 2023 08:47:27 -0500 Subject: [PATCH] Fix the context API in lists --- packages/core/src/diff.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/diff.rs b/packages/core/src/diff.rs index 270c81730..e3ca19c3a 100644 --- a/packages/core/src/diff.rs +++ b/packages/core/src/diff.rs @@ -15,6 +15,7 @@ use DynamicNode::*; impl<'b> VirtualDom { pub(super) fn diff_scope(&mut self, scope: ScopeId) { + self.runtime.scope_stack.borrow_mut().push(scope); let scope_state = &mut self.get_scope(scope).unwrap(); unsafe { // Load the old and new bump arenas @@ -45,6 +46,7 @@ impl<'b> VirtualDom { (Aborted(l), Ready(r)) => self.replace_placeholder(l, [r]), }; } + self.runtime.scope_stack.borrow_mut().pop(); } fn diff_ok_to_err(&mut self, l: &'b VNode<'b>, p: &'b VPlaceholder) {