Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

update Paginator.js to only remove an item when it actually exists. #27

Merged
merged 1 commit into from
Jul 8, 2015

Conversation

hassanbazzi
Copy link

if indexOf returns -1, and we're trying to remove an item that doesn't exist, then the current code will delete the last item in the array anyways.

amirite?

@ProLoser
Copy link
Member

ProLoser commented Jul 8, 2015

Good catch, but do this:

if (~item)
  this.items.splice(item, 1);

ProLoser added a commit that referenced this pull request Jul 8, 2015
update Paginator.js to only remove an item when it actually exists.
@ProLoser ProLoser merged commit d2d0ecd into angular-ui:master Jul 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants