Bug Tracker

Ticket #7226 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 4 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 4 years ago by kdavis@…

okay, that diff didn't come thru very well

comment:3 Changed 4 years ago by John Resig

  • Status changed from new to closed
  • Resolution set to fixed

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

Changeset: a7d0b0b9e887782bf1ed795152a845da87729c52

Note: See TracTickets for help on using tickets.