Skip to content

Commit

Permalink
fix unregister method
Browse files Browse the repository at this point in the history
  • Loading branch information
jseppi committed Aug 25, 2014
1 parent 5f3a975 commit 0d39177
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/angular-dropdowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ angular.module('ngDropdowns', []).directive('dropdownSelect', [
var index;
index = _dropdowns.indexOf(ddEl);
if (index > -1) {
_dropdowns.splice(index, -1);
_dropdowns.splice(index, 1);
}
};
service.toggleActive = function(ddEl) {
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-dropdowns.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/dropdowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ angular.module('ngDropdowns', []).directive('dropdownSelect', [
var index;
index = _dropdowns.indexOf(ddEl);
if (index > -1) {
_dropdowns.splice(index, -1);
_dropdowns.splice(index, 1);
}
};
service.toggleActive = function(ddEl) {
Expand Down
2 changes: 1 addition & 1 deletion src/dropdowns.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ angular.module('ngDropdowns', [])

service.unregister = (ddEl) ->
index = _dropdowns.indexOf(ddEl)
_dropdowns.splice(index, -1) if index > -1
_dropdowns.splice(index, 1) if index > -1
return

service.toggleActive = (ddEl) ->
Expand Down

0 comments on commit 0d39177

Please sign in to comment.