Remove use of deprecated $.isArray

pull/499/head
Allan Jardine 4 years ago
parent e081c863a4
commit d260b2282c

@ -38,7 +38,7 @@ $.fn.dataTable.Api.register( 'columns().order()', function ( dir ) {
var a = [];
for ( var i=0, ien=columns.length ; i<ien ; i++ ) {
a.push( [ columns[i], $.isArray(dir) ? dir[i] : dir ] );
a.push( [ columns[i], Array.isArray(dir) ? dir[i] : dir ] );
}
new $.fn.dataTable.Api( settings ).order( a );

@ -43,7 +43,7 @@
name = '';
}
if ($.isPlainObject(data) || $.isArray(data)) {
if ($.isPlainObject(data) || Array.isArray(data)) {
$.each(data, function(idx, val) {
if (name === '') {
flattenJson(val, idx, flattened);

@ -58,8 +58,8 @@ $.fn.dataTable.LengthLinks = function ( inst ) {
}
var menu = settings.aLengthMenu;
var lang = menu.length===2 && $.isArray(menu[0]) ? menu[1] : menu;
var lens = menu.length===2 && $.isArray(menu[0]) ? menu[0] : menu;
var lang = menu.length===2 && Array.isArray(menu[0]) ? menu[1] : menu;
var lens = menu.length===2 && Array.isArray(menu[0]) ? menu[0] : menu;
var out = $.map( lens, function (el, i) {
return el == api.page.len() ?

@ -69,7 +69,7 @@ var _unique = 0;
// Function to encapsulate code that is common to both the string and number
// ordering plug-ins.
var _setup = function ( values ) {
if ( ! $.isArray( values ) ) {
if ( ! Array.isArray( values ) ) {
values = [ values ];
}

Loading…
Cancel
Save