More strict null checks (#60565)

This commit is contained in:
Alex Dima
2018-10-12 17:53:21 +02:00
parent 4eb61b9ada
commit 5bd13a8cee
24 changed files with 180 additions and 153 deletions

View File

@@ -728,7 +728,7 @@ export function getLargestChildWidth(parent: HTMLElement, children: HTMLElement[
// ----------------------------------------------------------------------------------------
export function isAncestor(testChild: Node | null, testAncestor: Node): boolean {
export function isAncestor(testChild: Node | null, testAncestor: Node | null): boolean {
while (testChild) {
if (testChild === testAncestor) {
return true;