diff --git a/hibou_professional/static/src/js/core.js b/hibou_professional/static/src/js/core.js index d1da15da..ee460f45 100644 --- a/hibou_professional/static/src/js/core.js +++ b/hibou_professional/static/src/js/core.js @@ -30,7 +30,10 @@ var HibouProfessionalSystrayWidget = Widget.extend({ }, get_subjects: function(type) { - return this.message_subjects[type] || []; + if (this.message_subjects && this.message_subjects[type]) { + return this.message_subjects[type] + } + return []; }, update_message_type: function(el) { diff --git a/hibou_professional/static/src/xml/templates.xml b/hibou_professional/static/src/xml/templates.xml index a35021e9..cda9bb9d 100644 --- a/hibou_professional/static/src/xml/templates.xml +++ b/hibou_professional/static/src/xml/templates.xml @@ -10,7 +10,7 @@