From 7b672d678b5503e687af3e347fc830d982674830 Mon Sep 17 00:00:00 2001 From: Mottie Date: Sat, 23 Feb 2013 23:59:27 -0600 Subject: [PATCH] prevent error in IE8 - fixes issue #246 --- js/jquery.tablesorter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index c5288b20..2060f862 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -963,7 +963,7 @@ ts.getTextValue = function(a, mx, d) { if (mx) { // make sure the text value is greater than the max numerical value (mx) - var i, l = a.length, n = mx + d; + var i, l = a ? a.length : 0, n = mx + d; for (i = 0; i < l; i++) { n += a.charCodeAt(i); }