mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-04 07:44:01 +01:00
Check if we have a nextSibling first
Test if we have a nextSibling before determining a tagName. This is so if we have a dir with only subdirs (ie, no files) and the last subdir is empty, there will be no UL list (which we're looking to maybe remove).
This commit is contained in:
@@ -59,7 +59,7 @@ if (isset($_GET['location'])) {
|
||||
newUL = document.createElement("ul");
|
||||
newUL.style = "display: block";
|
||||
locNest = targetElem.parentNode.parentNode;
|
||||
if(locNest.nextSibling.tagName=="UL") {
|
||||
if(locNest.nextSibling && locNest.nextSibling.tagName=="UL") {
|
||||
x = locNest.nextSibling;
|
||||
x.parentNode.removeChild(x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user