Opened 13 years ago
Closed 13 years ago
#5750 closed bug (fixed)
$.extend copies by reference, even with deep=true (patch)
Reported by: | fortes | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | core | Version: | 1.4a2 |
Keywords: | extend | Cc: | |
Blocked by: | Blocking: |
Description
a = { arr: [1, 2, 3] }
b = $.extend(true, {}, a)
b.arr.pop()
Should be false, but is true
a.arr === b.arr
Attachments (1)
Change History (5)
Changed 13 years ago by
Attachment: | deep-extend-array.patch added |
---|
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
I shouldn't continue to code on low sleep, but here's a more compact version (ignore the attached patch): http://github.com/fortes/jquery/commit/8c77139415ba86024b545dde326e9fee9b06fb4c
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
With real formatting: