diff --git a/lib/get-branch.php b/lib/get-branch.php index 793431d..8f7b7d8 100644 --- a/lib/get-branch.php +++ b/lib/get-branch.php @@ -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); }