Fix: Update for jQuery 3.3 deprecated functions

pull/377/head
Allan Jardine 6 years ago
parent 7a6ff3585f
commit da67f99c24

@ -70,7 +70,7 @@
} }
}; };
if ($.isNumeric(config.speed) || $.type(config.speed) === 'string') { if ( config.speed !== undefined ) {
speed = config.speed; speed = config.speed;
} }

@ -19,9 +19,10 @@ jQuery.fn.dataTableExt.aTypes.unshift(
function ( sData ) function ( sData )
{ {
var deformatted = sData.replace(/[^\d\-\.\/a-zA-Z]/g,''); var deformatted = sData.replace(/[^\d\-\.\/a-zA-Z]/g,'');
if ( $.isNumeric( deformatted ) || deformatted === "-" ) { var isNumeric = !isNaN( deformatted - parseFloat( deformatted ) );
return 'formatted-num';
} return isNumeric || deformatted === "-" ?
return null; 'formatted-num' :
null;
} }
); );

Loading…
Cancel
Save