From 1b9575b9d14399e9426b9eacdd92b3717846c3f2 Mon Sep 17 00:00:00 2001 From: Manoj Kumar Date: Sun, 14 Aug 2016 10:54:16 +0000 Subject: Core: Deprecate jQuery.isArray Fixes gh-2961 Closes gh-3278 --- src/attributes/val.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/attributes/val.js') diff --git a/src/attributes/val.js b/src/attributes/val.js index fbf406929..9245e4e0a 100644 --- a/src/attributes/val.js +++ b/src/attributes/val.js @@ -62,7 +62,7 @@ jQuery.fn.extend( { } else if ( typeof val === "number" ) { val += ""; - } else if ( jQuery.isArray( val ) ) { + } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; } ); @@ -173,7 +173,7 @@ jQuery.extend( { jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { + if ( Array.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } -- cgit v1.2.3