fix: added check if there is no parent element
This commit is contained in:
1 parent
1e9a4ad08f
commit
4876684461
1 file changed
+3
@@ -119,6 +119,9 @@
|
||||
return currentElement;
|
||||
}
|
||||
currentElement = currentElement.parentElement;
|
||||
if (currentElement === null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user