Side navigation
#14409 closed bug (notabug)
Opened September 30, 2013 11:28PM UTC
Closed October 01, 2013 12:49AM UTC
.map(fn).toArray() and .map(fn).get() will flatten inner arrays
Reported by: | nick@clearstorydata.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Mapping over a selection with a function that returns arrays will flatten all returned values into a 1d array, instead of returning a 2d array as expected.
To reproduce:
$('<p/>').map(function() { return [1,2]; }).get(); // [1,2] $('<p/><p/>').map(function() { return [1,2]; }).get(); // [1,2,1,2]
Attachments (0)
Change History (1)
Changed October 01, 2013 12:49AM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Was that expected after reading the docs?