diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-08-06 11:58:38 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-08-06 11:58:38 -0400 |
commit | 5f026ccb992d9737e1af05362849ff72faa2172c (patch) | |
tree | 27cd762acac846c5c48d7a55cdf0f835065ad13a /lib/js | |
parent | 4234e12dd51638797197ea6e6f03c05453527961 (diff) |
Tweaking dyn() implementation to get grid working
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 6 |
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); } }; |