diff --git a/app/assets/javascripts/discourse/lib/desktop-notifications.js.es6 b/app/assets/javascripts/discourse/lib/desktop-notifications.js.es6 index 894ac2c7e58..dc20601f417 100644 --- a/app/assets/javascripts/discourse/lib/desktop-notifications.js.es6 +++ b/app/assets/javascripts/discourse/lib/desktop-notifications.js.es6 @@ -28,8 +28,15 @@ function init(messageBus) { return; } - if (!Notification) { - Em.Logger.info('Discourse desktop notifications are disabled - not supported by browser'); + + + try { + if (!Notification) { + Em.Logger.info('Discourse desktop notifications are disabled - not supported by browser'); + return; + } + } catch (e) { + Em.Logger.info('Discourse desktop notifications are disabled - not defined'); return; }