mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
fix component swap test
This commit is contained in:
parent
cdf25f0c14
commit
50873bf9c7
1 changed files with 6 additions and 2 deletions
|
@ -94,9 +94,13 @@ impl Runtime {
|
|||
///
|
||||
/// Useful in a limited number of scenarios
|
||||
pub fn on_scope<O>(&self, id: ScopeId, f: impl FnOnce() -> O) -> O {
|
||||
self.scope_stack.borrow_mut().push(id);
|
||||
{
|
||||
self.scope_stack.borrow_mut().push(id);
|
||||
}
|
||||
let o = f();
|
||||
self.scope_stack.borrow_mut().pop();
|
||||
{
|
||||
self.scope_stack.borrow_mut().pop();
|
||||
}
|
||||
o
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue