diff --git a/sorting/formatted-numbers.js b/sorting/formatted-numbers.js index 71307b0..fc6bd43 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 ); },