diff options
author | 2009-08-06 11:58:38 -0400 | |
---|---|---|
committer | 2009-08-06 11:58:38 -0400 | |
commit | 5f026ccb992d9737e1af05362849ff72faa2172c (patch) | |
tree | 27cd762acac846c5c48d7a55cdf0f835065ad13a | |
parent | 4234e12dd51638797197ea6e6f03c05453527961 (diff) |
Tweaking dyn() implementation to get grid working
-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); } }; |