jQuery: The Write Less, Do More JavaScript Library

Ticket #2486 (closed bug: fixed)

Opened 5 months ago

Last modified 5 months ago

jQuery.map() string as callback parameter is broken

Reported by: flexer Assigned to: anonymous
Type: bug Priority: critical
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords: map
Cc: Needs: Review

Description

If the argument is a string, it is treated as a short "lambda-form" function, with "a" representing the list item. For example, "a * a" may be passed instead of "function(a){ return a * a; }".

This is broken even in the docs Demo: http://docs.jquery.com/Utilities/jQuery.map

Attachments

Change History

Changed 5 months ago by davidserduke

  • status changed from new to closed
  • resolution set to fixed

Thanks for pointing that out. The demo has been fixed.

For more information about why this feature was removed see #2402.

Note: See TracTickets for help on using tickets.