mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] component: re-introduce error handling in lifecycle
This commit is contained in:
committed by
Géry Debongnie
parent
e611c20ab4
commit
ad4673cb36
@@ -2,6 +2,7 @@ import type { BDom } from "../blockdom";
|
||||
import { mount } from "../blockdom";
|
||||
import type { ComponentNode } from "./component_node";
|
||||
import { STATUS } from "./status";
|
||||
import { fibersInError } from "./error_handling";
|
||||
// import { mountBlock } from "./bdom/block";
|
||||
|
||||
export function makeChildFiber(node: ComponentNode, parent: Fiber): Fiber {
|
||||
@@ -27,6 +28,10 @@ export function makeRootFiber(node: ComponentNode): Fiber {
|
||||
current.children = [];
|
||||
root.counter++;
|
||||
current.bdom = null;
|
||||
if (fibersInError.has(current)) {
|
||||
fibersInError.delete(current);
|
||||
fibersInError.delete(root);
|
||||
}
|
||||
return current;
|
||||
}
|
||||
const fiber = new RootFiber(node);
|
||||
@@ -81,7 +86,6 @@ export class Fiber {
|
||||
|
||||
export class RootFiber extends Fiber {
|
||||
counter: number = 1;
|
||||
error: Error | null = null;
|
||||
resolve: any;
|
||||
promise: Promise<any>;
|
||||
reject: any;
|
||||
|
||||
Reference in New Issue
Block a user