Ticket #1228 (closed bug: fixed)
OpenLayers.Util.removeItem does not remove consecutive items
| Reported by: | openlayers | Owned by: | |
|---|---|---|---|
| Priority: | trivial | Milestone: | 2.6 Release |
| Component: | Util | Version: | 2.5 |
| Keywords: | Cc: | ccljacobson@… | |
| State: | Complete |
Description
The OpenLayers.Util.removeItem function does not remove all instances of the item from the array when the items are consecutive. For example, calling OpenLayers.Util.removeItem([1, 1], 1) results in the array [1] when it should be [].
There are several ways to fix the problem, the easiest way would be to decrement the variable i after the call to array.splice(i,1);
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

