summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 11:58:38 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 11:58:38 -0400
commitdb5124e67d20894db9fd6b41c93b0de13dc6892d (patch)
tree27cd762acac846c5c48d7a55cdf0f835065ad13a /lib
parent450fce98ec509c4f20aad498b6ceea9bbb790d15 (diff)
Tweaking dyn() implementation to get grid working
Diffstat (limited to 'lib')
-rw-r--r--lib/js/urweb.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 4d8418b6..05d32e90 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -291,7 +291,8 @@ function dyn(s) {
var old = node;
node = node.nextSibling;
- old.parentNode.removeChild(old);
+ if (old.parentNode)
+ old.parentNode.removeChild(old);
}
var cls = {v : null};
@@ -304,7 +305,8 @@ function dyn(s) {
for (var node = first; node; ) {
var old = node;
node = node.nextSibling;
- x.parentNode.insertBefore(old, x);
+ if (x.parentNode)
+ x.parentNode.insertBefore(old, x);
}
};