From e7f29ea214faa5f8dba69ea6ad2304932f7d3dee Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 30 Oct 2015 16:43:50 -0400 Subject: Fixing eslint not recursing --- .../components/user_settings/user_settings_notifications.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web/react/components/user_settings/user_settings_notifications.jsx') diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index 61d49acb2..2b904763c 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -37,18 +37,18 @@ function getNotificationsStateFromStores() { if (user.notify_props.mention_keys) { var keys = user.notify_props.mention_keys.split(','); - if (keys.indexOf(user.username) !== -1) { + if (keys.indexOf(user.username) === -1) { + usernameKey = false; + } else { usernameKey = true; keys.splice(keys.indexOf(user.username), 1); - } else { - usernameKey = false; } - if (keys.indexOf('@' + user.username) !== -1) { + if (keys.indexOf('@' + user.username) === -1) { + mentionKey = false; + } else { mentionKey = true; keys.splice(keys.indexOf('@' + user.username), 1); - } else { - mentionKey = false; } customKeys = keys.join(','); -- cgit v1.2.3-1-g7c22