Ticket #606 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 2 years ago

Array.pushUnique() does not handle arrays containing objects

Reported by: PhilHawksworth Owned by: JeremyRuston
Priority: minor Milestone: 2011.cleanup
Component: core Version:
Severity: low Keywords:
Cc:

Description

If I push an object into an array which already contains an identical object, pushUnique should prevent duplicates being added to the array.

For example

var test_obj_arr = [{id:1}, {id:2}];
test_obj_arr.pushUnique({id:2});

should not alter the array.

Change History

Changed 5 years ago by MartinBudden

  • severity changed from trivial to low
  • milestone set to 2.5

Changed 4 years ago by MartinBudden

  • milestone changed from 2.5.1 to 2.6

Changed 3 years ago by MartinBudden

  • milestone changed from 2.6.2 to 2.7.1

Milestone 2.6.2 deleted

Changed 2 years ago by MartinBudden

  • status changed from new to closed
  • resolution set to wontfix
  • milestone changed from 2.7.1 to 2011.cleanup

Although the current behaviour is technically wrong, it is known and can be worked around. pushUnique was written as a convenience function for basic types.

Note: See TracTickets for help on using tickets.