fix(ivy): assertDomNode will now work properly in a worker (#28382)
PR Close #28382
This commit is contained in:
parent
929fe029c2
commit
7bae49b419
|
@ -65,8 +65,9 @@ export function throwError(msg: string): never {
|
|||
}
|
||||
|
||||
export function assertDomNode(node: any) {
|
||||
// If we're in a worker, `Node` will not be defined.
|
||||
assertEqual(
|
||||
node instanceof Node ||
|
||||
(typeof Node !== 'undefined' && node instanceof Node) ||
|
||||
(typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'),
|
||||
true, 'The provided value must be an instance of a DOM Node');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue