#9025 closed bug (wontfix)
jQuery.map( array_like ) and bounding values
Reported by: | Robert Katić | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | core | Version: | 1.5.2 |
Keywords: | neededdocs | Cc: | |
Blocked by: | Blocking: |
Description
Change History (12)
comment:2 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → low |
Resolution: | → duplicate |
Status: | new → closed |
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.
comment:4 Changed 12 years ago by
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.
comment:7 Changed 12 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Reopening as it would appear that #9750 is a dupe and this already has a pull request on it.
comment:9 Changed 12 years ago by
Keywords: | needsdocs added |
---|---|
Resolution: | → wontfix |
Status: | reopened → closed |
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.
comment:10 Changed 12 years ago by
@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).
comment:11 Changed 12 years ago by
@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.
comment:12 Changed 12 years ago by
Keywords: | neededdocs added; needsdocs removed |
---|
The docs for this item have been updated by Karl and I.
Updated test: http://jsfiddle.net/CPj3F/
Previous one is not completely correct.