fix web playwright tests

This commit is contained in:
Evan Almloff committed 2024-02-05 15:25:51 -06:00
1 parent 1bbceac4e1
commit c431429448
10 files changed
+21 -11

No files matched your search

+2 -1
View File
@@ -45,8 +45,9 @@ pub fn provide_context<T: 'static + Clone>(value: T) -> T {
}
/// Provide a context to the root scope
pub fn provide_root_context<T: 'static + Clone>(value: T) -> Option<T> {
pub fn provide_root_context<T: 'static + Clone>(value: T) -> T {
Runtime::with_current_scope(|cx| cx.provide_root_context(value))
.expect("to be in a dioxus runtime")
}
/// Suspends the current component