mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
Resolve issue with scope disposal panicking because it can't find runtime (because runtime already dropped)
This commit is contained in:
parent
4a1d16b641
commit
9c0d813697
1 changed files with 1 additions and 9 deletions
|
@ -75,15 +75,7 @@ impl RuntimeId {
|
|||
cfg_if! {
|
||||
if #[cfg(not(any(feature = "csr", feature = "hydrate")))] {
|
||||
let runtime = RUNTIMES.with(move |runtimes| runtimes.borrow_mut().remove(self));
|
||||
if let Some(runtime) = runtime {
|
||||
for (scope_id, _) in runtime.scopes.borrow().iter() {
|
||||
let scope = Scope {
|
||||
runtime: self,
|
||||
id: scope_id,
|
||||
};
|
||||
scope.dispose();
|
||||
}
|
||||
}
|
||||
drop(runtime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue