[FIX] component: error_handling on current component

Have a Child Compnent which has one component that succeeds and another
one that fails at its instanciation.
The Child component handles the Errors by rendering itself.

Before this commit, the error handling algorithm made impossible for the scheduler to finish.
This was because the current fiber was still counted as ongoing, when it was actually completed.

After this commit, this use case is handled correctly.
This commit is contained in:
Lucas Perais (lpe)
2021-11-16 16:26:39 +01:00
committed by Aaron Bohy
parent c627b0add8
commit ee5f6c7569
4 changed files with 222 additions and 4 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ export class ComponentNode<T extends typeof Component = any> implements VNode<Co
if (fiber && !fiber.bdom && !fibersInError.has(fiber)) {
return fiber.root.promise;
}
if (!this.bdom && !this.fiber) {
if (!this.bdom && !fiber) {
// should find a way to return the future mounting promise
return;
}