Skip to main content

Bug Tracker

Side navigation

#11411 closed bug (duplicate)

Opened February 28, 2012 05:08PM UTC

Closed February 28, 2012 05:41PM UTC

Last modified February 28, 2012 05:41PM UTC

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

Reported by: turbo@minato.tv 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.

Attachments (0)
Change History (3)

Changed February 28, 2012 05:14PM UTC by gibson042 comment:1

Duplicate of #10867.

Changed February 28, 2012 05:41PM UTC by timmywil comment:2

resolution: → duplicate
status: newclosed

Changed February 28, 2012 05:41PM UTC by timmywil comment:3

Duplicate of #10867.