aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-01-14 11:24:17 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-01-14 11:24:17 -0500
commitf2b84bc39038d11eed7a82da0ddb875fa48839a4 (patch)
treecb4f73a03b8d1d1eb97c8cab4742b4bed0f1e3e3 /lib/js
parenta3f5a3a95ee01e9d27933ca5c1c755ceb9dac1af (diff)
Fix bug with 'dynClass' immediately inside <dyn>
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js7
1 files changed, 4 insertions, 3 deletions
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);
}