Skip to content
Permalink
Browse files

jquery core: fixed deep extend of objects. Closes #1562 & #2820.

  • Loading branch information
flesler committed May 14, 2008
1 parent 831625c commit 69f72761faa6878e361711b70f1d27c467d256e4
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core.js
@@ -579,8 +579,11 @@ jQuery.extend = jQuery.fn.extend = function() {
continue;

// Recurse if we're merging object values
if ( deep && copy && typeof copy == "object" && src && !copy.nodeType )
target[ name ] = jQuery.extend( deep, src, copy );
if ( deep && copy && typeof copy == "object" && !copy.nodeType )
target[ name ] = jQuery.extend( deep,
// Never move original objects, clone them
src || ( copy.length != null ? [ ] : { } )
, copy );

// Don't bring in undefined values
else if ( copy !== undefined )

0 comments on commit 69f7276

Please sign in to comment.
You can’t perform that action at this time.