Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#11411 closed bug (duplicate)

jQuery.extend may not work well, when a boolean value is not specified at the first argument.

Reported by: turbo@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Description

In jQuery 1.6.4, jQuery.extend may not work well, when a boolean value is not specified at the first argument.

1) jQuery.extend(target, obj1) 2) jQuery.extend(false, target, obj1)

I expect the same object will be returned both 1) and 2). But 1) and 2) sometimes return the dirrent objects.

At line 328 of jquery-1.6.4.js, there is "target = arguments[0]
{}". When argument[0] value is false, target is set to {}.
Then "target = arguments[1]
{};" and "i = 2;" at line 336-338 will not be processed, because "if ( typeof target === "boolean" )" at line 334 will not be true.

Change History (3)

comment:1 Changed 8 years ago by gibson042

Duplicate of #10867.

comment:2 Changed 8 years ago by timmywil

Resolution: duplicate
Status: newclosed

comment:3 Changed 8 years ago by timmywil

Duplicate of #10867.

Note: See TracTickets for help on using tickets.