# HG changeset patch # User Adam Chlipala # Date 1249574318 14400 # Node ID ed381288ce9a8a97cf0bf39862dbd93ff542876c # Parent 25a038a9194bf98ce723df11f109e87374e5d446 Tweaking dyn() implementation to get grid working diff -r 25a038a9194b -r ed381288ce9a lib/js/urweb.js --- a/lib/js/urweb.js Thu Aug 06 11:54:28 2009 -0400 +++ b/lib/js/urweb.js Thu Aug 06 11:58:38 2009 -0400 @@ -291,7 +291,8 @@ 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 @@ for (var node = first; node; ) { var old = node; node = node.nextSibling; - x.parentNode.insertBefore(old, x); + if (x.parentNode) + x.parentNode.insertBefore(old, x); } };