jQuery.extend(true, Object, Object) copies objects with length keys correctly
This commit is contained in:
parent
6b912beb7b
commit
8d52c27808
2 changed files with 8 additions and 2 deletions
|
@ -245,7 +245,7 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|||
if ( deep && copy && typeof copy === "object" && !copy.nodeType ) {
|
||||
target[ name ] = jQuery.extend( deep,
|
||||
// Never move original objects, clone them
|
||||
src || ( copy.length != null ? [ ] : { } ), copy );
|
||||
src || ( jQuery.isArray(copy) ? [ ] : { } ), copy );
|
||||
|
||||
// Don't bring in undefined values
|
||||
} else if ( copy !== undefined ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue