Allow file size plugin to work with empty strings

Fix #521
pull/526/head
Allan Jardine 4 years ago
parent f04c150d60
commit 234b470892

@ -19,6 +19,10 @@
*/
jQuery.fn.dataTable.ext.type.order['file-size-pre'] = function ( data ) {
if (data === null || data === '') {
return 0;
}
var matches = data.match( /^(\d+(?:\.\d+)?)\s*([a-z]+)/i );
var multipliers = {
b: 1,

Loading…
Cancel
Save