summaryrefslogtreecommitdiff
path: root/lib/js
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
commit5f026ccb992d9737e1af05362849ff72faa2172c (patch)
tree27cd762acac846c5c48d7a55cdf0f835065ad13a /lib/js
parent4234e12dd51638797197ea6e6f03c05453527961 (diff)
Tweaking dyn() implementation to get grid working
Diffstat (limited to 'lib/js')
-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);
}
};