Skip to main content

Bug Tracker

Side navigation

#9025 closed bug (wontfix)

Opened April 30, 2011 02:44AM UTC

Closed July 12, 2011 06:41PM UTC

Last modified July 24, 2011 07:12AM UTC

jQuery.map( array_like ) and bounding values

Reported by: rkatic Owned by:
Priority: low Milestone: 1.next
Component: core Version: 1.5.2
Keywords: neededdocs Cc:
Blocked by: Blocking:
Description
Attachments (0)
Change History (12)

Changed April 30, 2011 02:47AM UTC by rkatic comment:1

_comment0: Updated test: http://jsfiddle.net/CPj3F/1304370464123038

Updated test: http://jsfiddle.net/CPj3F/

Previous one is not completely correct.

Changed April 30, 2011 07:54PM UTC by timmywil comment:2

component: unfiledcore
priority: undecidedlow
resolution: → duplicate
status: newclosed

Further discussion of this issue should be in the forums. The meaning of array-like is under scrutiny and this will probably result in a change in the docs. However, it is true that { length: 0 } is not supported, so the resolution of this bug's duplicate is accurate.

Changed April 30, 2011 07:54PM UTC by timmywil comment:3

Duplicate of #9023.

Changed April 30, 2011 08:01PM UTC by rkatic comment:4

_comment0: True that all those bugs are related to what array-like is, but I would be careful to say this is ad duplicate. It reports a different symptom.1304194474463029

True that all those bugs are related to what array-like is, but I would be careful to say this is an duplicate. It reports an different symptom.

Changed May 02, 2011 08:53PM UTC by rkatic comment:5

Not duplicate. #9023 was fixed for me, but this bug is not:

Patch: https://github.com/jquery/jquery/pull/368

Changed July 11, 2011 11:13PM UTC by rkatic comment:6

This would also fix #9750.

Changed July 12, 2011 02:45PM UTC by addyosmani comment:7

resolution: duplicate
status: closedreopened

Reopening as it would appear that #9750 is a dupe and this already has a pull request on it.

Changed July 12, 2011 02:46PM UTC by addyosmani comment:8

#9750 is a duplicate of this ticket.

Changed July 12, 2011 06:41PM UTC by ajpiano comment:9

keywords: → needsdocs
resolution: → wontfix
status: reopenedclosed

The consensus we've reached at this stime is that we will not be attempting to detect host objects in $.isPlainObject and $.map. While edge cases like this do come up, detection is unreliable and comes at a relatively high cognitive cost without clear benefit to the vast majority of jQuery users. If in the future, it becomes apparent that this issue is something that is a pain point to a larger contingent of developers, we can revisit the issue. We'll be documenting that array-like objects need to be converted into real arrays before being passed to $.map.

Changed July 19, 2011 03:19PM UTC by rkatic comment:10

@ajpiano: With your comment I have a serous suspicion that you really tried to understand what this bug/patch is about (certainly it is not about host objects). I don't blame you, it is probably my fault too (will try to be more obvious in future).

Changed July 19, 2011 03:57PM UTC by ajpiano comment:11

@rkatic: I hava serious suspicion you really meant to say that I "didn't" really try to understand what this bug/patch is about :) I read my own comment over though a bit and admit that it seems like a response to a different/multiple tickets - which is what I was attempting to do - to explain that at the recent triage sprint we've decided that the resolution to a number of these issues with handling edge cases in core methods will have documentation-, not code-, based solutions.

Changed July 24, 2011 07:12AM UTC by addyosmani comment:12

keywords: needsdocsneededdocs

The docs for this item have been updated by Karl and I.