#9023 closed bug (invalid)
jQuery.map( { length: 0 } )
Reported by: | Robert Katić | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | core | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
IF
{ length: 3, 0: "a", 1: "b", 2: "c" }
is array-like, then there is NO reason why
{ length: 0 }
should not.
Change History (7)
comment:1 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 12 years ago by
Disagree.
"Array-like objects, such as jQuery collections, are treated as arrays. In other words, if an object has a .length property and a value on the .length - 1 index, it is traversed as an array."
So { length: 0, "-1": "a" } is a an array, but { length: 0 } is not?
comment:5 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
Consider the following:
Array-like objects, such as jQuery collections, are treated as arrays. In other words, if an object has a .length property and a value on the .length - 1 index, it is traversed as an array.
From http://api.jquery.com/jquery.map/
Your example does not meet the criteria and therefore is invalid.