# HG changeset patch # User Adam Chlipala # Date 1253045172 14400 # Node ID 7710f65935b66a53dd27f1e59e7d85ac534ec02b # Parent da3ec6014d2f7f3062fc78bd09a7f18605b1ed86 Filters displaying awfully diff -r da3ec6014d2f -r 7710f65935b6 lib/js/urweb.js --- a/lib/js/urweb.js Tue Sep 15 15:48:53 2009 -0400 +++ b/lib/js/urweb.js Tue Sep 15 16:06:12 2009 -0400 @@ -306,14 +306,18 @@ var arr = dummy.getElementsByTagName("tbody"); firstChild = null; - if (arr.length > 0 && table != null) { - var tbody = arr[0], next; - firstChild = document.createElement("script"); - table.insertBefore(firstChild, x); - for (var node = tbody.firstChild; node; node = next) { - next = node.nextSibling; - table.insertBefore(node, x); - } + var tbody; + if (arr.length > 0 && table != null) + tbody = arr[0]; + else + tbody = dummy; + + var next; + firstChild = document.createElement("script"); + table.insertBefore(firstChild, x); + for (var node = tbody.firstChild; node; node = next) { + next = node.nextSibling; + table.insertBefore(node, x); } } else if (pnode == "tr") { var dummy = document.createElement("body");