fix scope context
This commit is contained in:
1 parent
04cdb14e5b
commit
cb4c46154d
7 files changed
+83
-45
No files matched your search
@@ -110,11 +110,13 @@ impl VirtualDom {
|
||||
// Drop all the hooks once the children are dropped
|
||||
// this means we'll drop hooks bottom-up
|
||||
scope.hooks.get_mut().clear();
|
||||
let context = scope.context();
|
||||
{
|
||||
let context = scope.context();
|
||||
|
||||
// Drop all the futures once the hooks are dropped
|
||||
for task_id in context.spawned_tasks.borrow_mut().drain() {
|
||||
context.tasks.remove(task_id);
|
||||
// Drop all the futures once the hooks are dropped
|
||||
for task_id in context.spawned_tasks.borrow_mut().drain() {
|
||||
context.tasks.remove(task_id);
|
||||
}
|
||||
}
|
||||
|
||||
self.scopes.remove(id.0);
|
||||
|
||||
Reference in new issue
Block a user