Skip to content

Commit

Permalink
fix(utils): type isDomElement
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Mar 20, 2019
1 parent 13e489e commit 3f515f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/utils/getContainerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getContainerNode(selectorOrHTMLElement: string | HTMLElement) {
throw new Error(errorMessage);
}

return domElement as HTMLElement;
return domElement;
}

export default getContainerNode;
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function isDomElement(object) {
function isDomElement(object: any): object is HTMLElement {
return (
// @ts-ignore
object instanceof window.HTMLElement ||
(Boolean(object) && object.nodeType > 0)
);
Expand Down

0 comments on commit 3f515f6

Please sign in to comment.