Merge branch 'explain-map-concat' of https://github.com/ajpiano/jquery into ajpiano...
[jquery.git] / src / core.js
index 18cd3a3..008a88c 100644 (file)
@@ -532,6 +532,12 @@ jQuery.extend({
        },
 
        isEmptyObject: function( obj ) {
+
+    // Fixes #7413 Check to see if obj passes isPlainObject
+    if ( !jQuery.isPlainObject( obj ) ) {
+      return false;
+    }
+       
                for ( var name in obj ) {
                        return false;
                }
@@ -733,6 +739,7 @@ jQuery.extend({
                        }
                }
 
+               // Flatten any nested arrays
                return ret.concat.apply( [], ret );
        },