careful checking for a global that is not there

This commit is contained in:
Sam 2015-05-04 11:08:52 +10:00
parent 77a3bc1045
commit 5623827433

View file

@ -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;
}