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,10 +28,17 @@ function init(messageBus) {
return;
}
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;
}
if (Notification.permission === "granted") {
havePermission = true;