> var data = jQuery.extend(true, {}, arrComp);

You're extending an Array into an empty Object? That would lose the
Array-ness of the original object. I don't think this is a use case
that was ever anticipated, not sure it makes sense.

You could extend into an empty array [] to fix that, but after
creating a test case and looking at the code I can see it doesn't deep-
copy that either. I don't think the top-level object was intended to
be an Array. You could open an enhancement ticket for it though.

var x = [ {test:1}, {toast:2} ];
var y = $.extend(true, [], x);
x[1] = {twist: 3};
alert( x.toSource() ); // [{test:1}, {twist:3}]
-- 
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to