Commit 9a18ee30b6da61adeaa6c8b77081c61b09744a83
1 parent
d03db7d0
Notifications : Efface le message si erreur vide
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
public/js/services/NotifyServ.js
@@ -38,6 +38,9 @@ angular.module('NotifyServ', []).service('NotifyServ', [ | @@ -38,6 +38,9 @@ angular.module('NotifyServ', []).service('NotifyServ', [ | ||
38 | console.warn(message); | 38 | console.warn(message); |
39 | }, | 39 | }, |
40 | error: function (context, error) { | 40 | error: function (context, error) { |
41 | + if (!error) { | ||
42 | + error = ''; | ||
43 | + } | ||
41 | this.notify({ | 44 | this.notify({ |
42 | title: context, | 45 | title: context, |
43 | message: error | 46 | message: error |
@@ -80,6 +83,9 @@ angular.module('NotifyServ', []).service('NotifyServ', [ | @@ -80,6 +83,9 @@ angular.module('NotifyServ', []).service('NotifyServ', [ | ||
80 | }); | 83 | }); |
81 | }, | 84 | }, |
82 | error: function (context, error) { | 85 | error: function (context, error) { |
86 | + if (!error) { | ||
87 | + error = ''; | ||
88 | + } | ||
83 | commands = { | 89 | commands = { |
84 | title: context, | 90 | title: context, |
85 | message: error, | 91 | message: error, |