isDigit function now false with an empty string. Issue #88

This commit is contained in:
Rob Garrison 2012-06-05 18:03:31 -05:00
parent 0c2c9a718d
commit fdda285b1f

View File

@ -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