From 9d23e4cfba02a88f18b8828a08e011dca7999152 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 22 Jul 2012 17:17:13 +0100 Subject: [PATCH] if condition checks for node existence first --- lib/coder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coder.js b/lib/coder.js index 9d61950..bcb13f0 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -605,7 +605,7 @@ var ICEcoder = { if (submenu[j].tagName=="A") { submenu[j].onclick = function() { var node = this.parentNode.nextSibling.nextSibling; - if (node.tagName=="UL") { + if (node && node.tagName=="UL") { var d=(node.style.display=="none"); node.style.display=(d) ? "block" : "none"; this.className=(d) ? this.parentNode.className="pft-directory dirOpen" : this.parentNode.className="pft-directory";