From f2b84bc39038d11eed7a82da0ddb875fa48839a4 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 14 Jan 2012 11:24:17 -0500 Subject: Fix bug with 'dynClass' immediately inside --- lib/js/urweb.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/js') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index ba73e744..adab5f43 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -643,9 +643,10 @@ function parent() { } function addNode(node) { - if (thisScript) - thisScript.parentNode.replaceChild(node, thisScript); - else + if (thisScript) { + if (thisScript.parentNode) + thisScript.parentNode.replaceChild(node, thisScript); + } else lastParent().appendChild(node); } -- cgit v1.2.3