Skip to main content

Bug Tracker

Side navigation

#5306 closed bug (fixed)

Opened September 30, 2009 07:36AM UTC

Closed November 11, 2009 06:07PM UTC

$.isObject() is incorrect, and in some cases will cause $.extend() malfunctions

Reported by: Tony Chen Owned by:
Priority: major Milestone: 1.4
Component: core Version:
Keywords: Cc:
Blocked by: Blocking:


x = { a:{ a1:1, a2:2 }, b:2 };
y = { a:{ a3:3 }, c:3 };
console.log("x is ",JSON.stringify(x));
console.log("y is ",JSON.stringify(y));
console.log("$.isObject(x) is ",$.isObject(x))
z = $.extend(true,{}, x, y);
console.log("execut: z = $.extend(true,{}, x, y);");
console.log("x is ",JSON.stringify(x)," <--should not be changed!");


x is  {"a":{"a1":1,"a2":2},"b":2}
y is {"a":{"a3":3},"c":3}
$.isObject(x) is false
execut: z = $.extend(true,{}, x, y);
x is {"a":{"a1":1,"a2":2,"a3":3},"b":2} <-- should not be changed!
Attachments (0)
Change History (2)

Changed September 30, 2009 11:16AM UTC by Tony Chen comment:1

From revision 6442 up to 6586

Changed November 11, 2009 06:07PM UTC by john comment:2

resolution: → fixed
status: newclosed