added sanity check for when the table has been altered
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Aug 2006 18:41:58 +0000 (18:41 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Aug 2006 18:41:58 +0000 (18:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5661 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/sorttable.js

index ca85bd2..710da47 100644 (file)
@@ -70,6 +70,7 @@ function ts_resortTable(lnk) {
     // Work out a type for the column
     if (table.rows.length <= 1) return;
     var itm = ts_getInnerText(table.rows[1].cells[column]);
+        if(!itm) return;
     sortfn = ts_sort_caseinsensitive;
     if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date;
     if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date;