Skip to content

Commit

Permalink
build files
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Gray committed Dec 3, 2014
1 parent bedc70b commit bfb2c94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions build/angular-growl.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,20 @@ angular.module('angular-growl').service('growlMessages', [
};
this.getAllMessages = function (referenceId) {
referenceId = referenceId || 0;
return this.directives[referenceId].messages;
if (this.directives[referenceId]) {
return this.directives[referenceId].messages;
} else {
return [];
}
};
this.destroyAllMessages = function (referenceId) {
var messages = this.getAllMessages(referenceId);
angular.forEach(messages, function (message) {
message.destroy();
});
this.directives[referenceId].messages = [];
if (this.directives[referenceId]) {
this.directives[referenceId].messages = [];
}
};
this.addMessage = function (message) {
var directive = this.directives[message.referenceId];
Expand Down
2 changes: 1 addition & 1 deletion build/angular-growl.min.js

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

0 comments on commit bfb2c94

Please sign in to comment.