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

Commit d2d0ecd

Browse files
committed
Merge pull request #27 from hassanbazzi/master
update Paginator.js to only remove an item when it actually exists.
2 parents f12ea7c + 49ab96a commit d2d0ecd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/Paginator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ angular.module('App').factory('Paginator', function($http, $q){
9797
if (!this.items[item])
9898
item = this.items.indexOf(item);
9999

100-
this.items.splice(item, 1);
100+
if(item !== -1)
101+
this.items.splice(item, 1);
101102
}
102103

103104
/**

0 commit comments

Comments
 (0)