[IMP] component: render does not return a promise anymore

This commit is contained in:
Géry Debongnie
2021-11-29 16:02:51 +01:00
committed by Aaron Bohy
parent 8a1ac13975
commit eceb3e6280
14 changed files with 103 additions and 208 deletions
+1 -3
View File
@@ -139,10 +139,9 @@ export class ComponentNode<T extends typeof Component = typeof Component>
async render() {
const current = this.fiber;
if (current && !current.bdom && !fibersInError.has(current)) {
return current.root.promise;
return;
}
if (!this.bdom && !current) {
// should find a way to return the future mounting promise
return;
}
const fiber = makeRootFiber(this);
@@ -166,7 +165,6 @@ export class ComponentNode<T extends typeof Component = typeof Component>
if (this.fiber && (current || !fiber.parent)) {
this._render(fiber);
}
return fiber.root.promise;
}
_render(fiber: Fiber | RootFiber) {