Skip to content

Commit

Permalink
isDigit function now false with an empty string. Issue #88
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Jun 5, 2012
1 parent 0c2c9a7 commit fdda285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/jquery.tablesorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@
};
this.isDigit = function(s) {
// replace all unwanted chars and match.
return (/^[\-+(]?\d*[)]?$/).test(s.replace(/[,.'\s]/g, ''));
return (/^[\-+(]?\d+[)]?$/).test(s.replace(/[,.'\s]/g, ''));
};

// regex used in natural sort
Expand Down

0 comments on commit fdda285

Please sign in to comment.