Try to fix for browsers that don't support notifications

This commit is contained in:
Eugen Rochko 2016-11-21 10:59:59 +01:00
parent c41dc5e8e9
commit e3665c1d67
2 changed files with 6 additions and 4 deletions

View file

@ -88,7 +88,7 @@ const Mastodon = React.createClass({
}
// Desktop notifications
if (Notification.permission === 'default') {
if (typeof window.Notification !== 'undefined' && Notification.permission === 'default') {
Notification.requestPermission();
}
},