From fb018d9f4abbb2d4e479f5fb0fa7a6ec1d5ddab4 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Wed, 17 Aug 2022 18:39:08 +0100 Subject: [PATCH] Fix missing .length --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8f07fd6..1947b85 100644 --- a/index.js +++ b/index.js @@ -338,7 +338,7 @@ function GetFirstSubElement(t,r) { return t } function InsertBefore(p,c) { - if (p.childNodes > 0) {p.insertBefore(c, p.childNodes[0]);} else {p.appendChild(c);} + if (p.childNodes.length > 0) {p.insertBefore(c, p.childNodes[0]);} else {p.appendChild(c);} } function GetNavTextWidth(s) { var st = document.getElementById("st")