Bug Tracker

Opened 13 years ago

Closed 12 years ago

#5751 closed bug (worksforme)

null value in array makes jQuery.merge ignore rest of array

Reported by: jfix Owned by:
Priority: minor Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


this expression:

jQuery.merge([1, 2], [3, null, 4, 5])

should return

[1, 2, 3, null, 4, 5]

but returns

[1, 2, 3]

everything after (and including the null value) is ignored. I don't think this is the expected behaviour, at least it's not documented as such.

Change History (2)

comment:1 Changed 13 years ago by dmethvin

Component: unfiledcore

comment:2 Changed 12 years ago by addyosmani

Resolution: worksforme
Status: newclosed

I've recreated your submitted test case here: http://jsfiddle.net/addyosmani/XVXGY/2/ and run this against IE6, IE7, IE8, FireFox 3.6.10 and Webkit browsers (Chrome, Safari). All of these browsers returned the correct result [1, 2, 3, null, 4, 5].

I'm closing this ticket as worksforme, but please feel free to re-submit if you are able to provide further information regarding this particular bug.

Note: See TracTickets for help on using tickets.