
committed by
Alex Rickabaugh

parent
f455518d80
commit
9993c72335
@ -165,7 +165,7 @@ export function createCustomElement<P>(
|
||||
|
||||
// Listen for events from the strategy and dispatch them as custom events
|
||||
this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe(e => {
|
||||
const customEvent = createCustomEvent(this.ownerDocument, e.name, e.value);
|
||||
const customEvent = createCustomEvent(this.ownerDocument !, e.name, e.value);
|
||||
this.dispatchEvent(customEvent);
|
||||
});
|
||||
}
|
||||
|
@ -74,8 +74,8 @@ export function createCustomEvent(doc: Document, name: string, detail: any): Cus
|
||||
/**
|
||||
* Check whether the input is an `Element`.
|
||||
*/
|
||||
export function isElement(node: Node): node is Element {
|
||||
return node.nodeType === Node.ELEMENT_NODE;
|
||||
export function isElement(node: Node | null): node is Element {
|
||||
return !!node && node.nodeType === Node.ELEMENT_NODE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user