From 4990460d0bde4d93aa71f171ce93a02ea9094769 Mon Sep 17 00:00:00 2001 From: Mottie Date: Wed, 30 Oct 2013 01:44:04 -0500 Subject: [PATCH] allow sorting zero value hex (0x00) --- js/jquery.tablesorter.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 49974e0a..669b41ee 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1066,11 +1066,10 @@ if (a === b) { return 0; } var xN, xD, yN, yD, xF, yF, i, mx, r = ts.regex; - // numeric or hex detection - yD = parseInt(b.match(r.hex), 16); // first try and sort Hex codes - if (yD) { + if (r.hex.test(b)) { xD = parseInt(a.match(r.hex), 16); + yD = parseInt(b.match(r.hex), 16); if ( xD < yD ) { return -1; } if ( xD > yD ) { return 1; } }