From 28d71624ef8ad9996c75907cdca7d3cce4bf4925 Mon Sep 17 00:00:00 2001 From: ealmloff Date: Sat, 9 Sep 2023 16:00:29 -0500 Subject: [PATCH] Restore context changes --- packages/core/src/runtime.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/core/src/runtime.rs b/packages/core/src/runtime.rs index ea518dbd2..d06818673 100644 --- a/packages/core/src/runtime.rs +++ b/packages/core/src/runtime.rs @@ -125,16 +125,7 @@ impl Runtime { /// This is useful for inserting or removing contexts from a scope, or rendering out its root node pub(crate) fn get_context(&self, id: ScopeId) -> Option> { Ref::filter_map(self.scope_contexts.borrow(), |contexts| { - match contexts.get(id.0) { - Some(context) => context.as_ref(), - _ => { - tracing::error!( - "Attempted to get context for scope that doesn't exist (id: {})", - id.0 - ); - None - } - } + contexts.get(id.0).and_then(|f| f.as_ref()) }) .ok() }