From e3665c1d675ad35be58328c1f3b0dc965938b8f1 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Mon, 21 Nov 2016 10:59:59 +0100
Subject: Try to fix for browsers that don't support notifications

---
 app/assets/javascripts/components/containers/mastodon.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'app/assets/javascripts/components/containers/mastodon.jsx')

diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx
index a8a9e365e..3528ef81c 100644
--- a/app/assets/javascripts/components/containers/mastodon.jsx
+++ b/app/assets/javascripts/components/containers/mastodon.jsx
@@ -88,7 +88,7 @@ const Mastodon = React.createClass({
     }
 
     // Desktop notifications
-    if (Notification.permission === 'default') {
+    if (typeof window.Notification !== 'undefined' && Notification.permission === 'default') {
       Notification.requestPermission();
     }
   },
-- 
cgit 

