Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10435 closed enhancement (wontfix)

jQuery.merge refactor

Reported by: MikeS Owned by:
Priority: low Milestone: None
Component: core Version: 1.7b1
Keywords: Cc:
Blocked by: Blocking:


  1. the code for guessing that 2nd argument is an object is:
if ( typeof second.length === "number" ) {

it will work incorrectly for strings, plain objects with 'length' property etc. Why not use jQuery.isPlainObject here?

  1. if both arguments are plain arrays, why no use Array.concat method?

Change History (1)

comment:1 Changed 11 years ago by timmywil

Component: unfiledcore
Priority: undecidedlow
Resolution: wontfix
Status: newclosed

The simplicity and speed of merge is much more important than allowing any type of arguments, given its vast usage internally.

Note: See TracTickets for help on using tickets.