Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#7226 closed bug (fixed)

clone on line 372 is declared implicitly

Reported by: kdavis@… Owned by:
Priority: undecided Milestone: 1.4.4
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:

Description

if ( copyIsArray ) {

copyIsArray = false; clone = src && jQuery.isArray(src) ? src : [];

} else {

clone = src && jQuery.isPlainObject(src) ? src : {};

}

Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy );

Change History (3)

comment:1 Changed 13 years ago by kdavis@…

diff --git a/public/javascripts/vendor/jquery.1.4.3.js b/public/javascripts/vendor/jquery.1.4.3.js index 84a82f6..c32216a 100644 --- a/public/javascripts/vendor/jquery.1.4.3.js +++ b/public/javascripts/vendor/jquery.1.4.3.js @@ -331,7 +331,7 @@ jQuery.fn.init.prototype = jQuery.fn;

jQuery.extend = jQuery.fn.extend = function() {

copy reference to target object

var target = arguments[0]+ var target = arguments[0]
{}, i = 1, length = arguments.length, deep = false, options, name, src, copy, copyIsArray;
{}, i = 1, length = arguments.length, deep = false, options, name, src, copy, copyIsArray, clone;

Handle a deep copy situation if ( typeof target === "boolean" ) {

comment:2 Changed 13 years ago by kdavis@…

okay, that diff didn't come thru very well

comment:3 Changed 13 years ago by John Resig

Resolution: fixed
Status: newclosed

Var wasn't being explicitly declared. Fixes #7226.

Changeset: a7d0b0b9e887782bf1ed795152a845da87729c52

Note: See TracTickets for help on using tickets.