Permalink
Browse files

Merge pull request #718 from RafiZz/12.0-fix-web_debranding-discuss_n…

…otification

🚑 "BusService.isMasterTab is not a function" error fixed.
  • Loading branch information...
yelizariev committed Jan 14, 2019
2 parents 4d1c13a + dd39032 commit 0f8de9c3e3e97bef68ae8a9fa707380d0669b516
Showing with 2 additions and 1 deletion.
  1. +2 −1 web_debranding/static/src/js/native_notifications.js
@@ -15,8 +15,9 @@ odoo.define('web_debranding.native_notifications', function (require) {
if (title === _t('Yay, push notifications are enabled!') || title === _t('Permission denied')) {
content = content.replace(/Odoo/ig, odoo.debranding_new_name);
}

if (window.Notification && Notification.permission === "granted") {
if (BusService.isMasterTab()) {
if (this.isMasterTab()) {
this._sendNativeNotification(title, content, callback);
}
} else {

0 comments on commit 0f8de9c

Please sign in to comment.