Skip to content

Commit

Permalink
Fixes marcorinck#9 message uniqueness is now checked on message text,…
Browse files Browse the repository at this point in the history
… severity and title
  • Loading branch information
JanStevens committed Apr 16, 2014
1 parent b0e4f13 commit 84f3142
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/growlDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ angular.module("angular-growl").directive("growl", ["$rootScope", "$sce",

$rootScope.$on("growlMessage", function(event, message) {
var found;
var msgText;
if (parseInt(referenceId, 10) === parseInt(message.referenceId, 10)) {
if (onlyUnique) {
angular.forEach($scope.messages, function(msg) {
if (message.text === msg.text && message.severity === msg.severity) {
msgText = $sce.getTrustedHtml(msg.text);
if (message.text === msgText && message.severity === msg.severity && msg.title === msg.title) {
found = true;
}
});
Expand Down

0 comments on commit 84f3142

Please sign in to comment.