summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/user_settings.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx
index d2d72884b..fa01d62c2 100644
--- a/web/react/components/user_settings.jsx
+++ b/web/react/components/user_settings.jsx
@@ -13,7 +13,7 @@ var assign = require('object-assign');
function getNotificationsStateFromStores() {
var user = UserStore.getCurrentUser();
- var soundNeeded = (!navigator || navigator.userAgent.toLowerCase().indexOf("firefox") === -1);
+ var soundNeeded = (!navigator || !navigator.userAgent || navigator.userAgent.toLowerCase().indexOf("firefox") === -1);
var sound = (!user.notify_props || user.notify_props.desktop_sound == undefined) ? "true" : user.notify_props.desktop_sound;
var desktop = (!user.notify_props || user.notify_props.desktop == undefined) ? "all" : user.notify_props.desktop;
var email = (!user.notify_props || user.notify_props.email == undefined) ? "true" : user.notify_props.email;