From 0e699842ac21b55ed887dfbae9365e0408b9a326 Mon Sep 17 00:00:00 2001 From: Bruno Pierri Galvao Date: Sun, 21 Apr 2013 14:28:20 +0530 Subject: [PATCH] added support for blank (no number) found this to be an issue in my app. hope it helps. --- sorting/formatted-numbers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorting/formatted-numbers.js b/sorting/formatted-numbers.js index 71307b0..9f08bf4 100644 --- a/sorting/formatted-numbers.js +++ b/sorting/formatted-numbers.js @@ -9,7 +9,7 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "formatted-num-pre": function ( a ) { - a = (a==="-") ? 0 : a.replace( /[^\d\-\.]/g, "" ); + a = (a === "-" || a === "" ? 0 : a.replace( /[^\d\-\.]/g, "" ); return parseFloat( a ); },