mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] remove cyclic dependency, improve error typing (#982)
This commit is contained in:
committed by
Aaron Bohy
parent
ed3e6dcbb6
commit
093218a067
@@ -127,7 +127,7 @@ export class ComponentNode<T extends typeof Component = any> implements VNode<Co
|
||||
try {
|
||||
await Promise.all(this.willStart.map((f) => f.call(component)));
|
||||
} catch (e) {
|
||||
handleError(this, e as Error);
|
||||
handleError({ node: this, error: e });
|
||||
return;
|
||||
}
|
||||
if (this.status === STATUS.NEW && this.fiber === fiber) {
|
||||
@@ -161,7 +161,7 @@ export class ComponentNode<T extends typeof Component = any> implements VNode<Co
|
||||
fiber.bdom = this.renderFn();
|
||||
fiber.root.counter--;
|
||||
} catch (e) {
|
||||
handleError(this, e as Error);
|
||||
handleError({ node: this, error: e });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user