Added check if there is no parent element

pull/1981/head
Leon Schmidt 2023-04-25 00:28:54 +02:00 committed by GitHub
parent 26a9cb67d8
commit 017408c8f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,8 @@
return currentElement;
}
currentElement = currentElement.parentElement;
if (currentElement === null) // if there is no parent element
return null;
}
return null;
};