mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6912c51657 |
@@ -1,5 +1,5 @@
|
|||||||
import type { ComponentNode } from "./component_node";
|
import type { ComponentNode } from "./component_node";
|
||||||
import { Fiber } from "./fibers";
|
import type { Fiber } from "./fibers";
|
||||||
|
|
||||||
export const fibersInError: WeakMap<Fiber, Error> = new WeakMap();
|
export const fibersInError: WeakMap<Fiber, Error> = new WeakMap();
|
||||||
export const nodeErrorHandlers: WeakMap<ComponentNode, ((error: Error) => void)[]> = new WeakMap();
|
export const nodeErrorHandlers: WeakMap<ComponentNode, ((error: Error) => void)[]> = new WeakMap();
|
||||||
@@ -41,7 +41,8 @@ function _handleError(node: ComponentNode | null, error: Error, isFirstRound = f
|
|||||||
export function handleError(entity: ComponentNode | Fiber, error: Error) {
|
export function handleError(entity: ComponentNode | Fiber, error: Error) {
|
||||||
let node: ComponentNode;
|
let node: ComponentNode;
|
||||||
let fiber: Fiber;
|
let fiber: Fiber;
|
||||||
if (entity instanceof Fiber) {
|
// soft type check on Fiber
|
||||||
|
if ("node" in entity) {
|
||||||
fiber = entity;
|
fiber = entity;
|
||||||
node = entity.node;
|
node = entity.node;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user