Bug Tracker

Modify

Ticket #1747 (closed bug: invalid)

Opened 6 years ago

Last modified 6 years ago

unique() doesn't work for arrays of non-objects

Reported by: rworth Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: unique numbers array objects Cc:
Blocking: Blocked by:

Description

the unique() function does not reduce an array of value-types (number, string, etc.). It only seems to work on arrays of objects, since as of 1.2, it uses jQuery.data internally.

See attached for patch including unit tests.

Attachments

unique.patch Download (3.6 KB) - added by rworth 6 years ago.

Change History

Changed 6 years ago by rworth

comment:1 Changed 6 years ago by rworth

  • Status changed from new to closed
  • Resolution set to invalid

"Unique only works with arrays of DOM elements. I've updated the [docs] page to represent this."

--John

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.