Skip to content

Commit

Permalink
destroy all messages with splice
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Gray committed Dec 3, 2014
1 parent ead1f35 commit cc6a3e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/growlMessageService.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ angular.module("angular-growl").service("growlMessages", ['$sce', '$timeout', fu
this.destroyAllMessages = function(referenceId) {
var messages = this.getAllMessages(referenceId);
for (var i = messages.length - 1; i >= 0; i--) {
message.destroy();
messages[i].destroy();
}
if (this.directives[referenceId]) {
this.directives[referenceId].messages = [];
Expand Down

0 comments on commit cc6a3e4

Please sign in to comment.