diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index b5fc2f3d61..b685c1f321 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -719,20 +719,17 @@ module.exports = React.createClass({ ); } - var emailNotificationsRow; - if (this.props.threepids.filter(function(tp) { - if (tp.medium == "email") { - return true; - } - }).length == 0) { + const emailThreepids = this.props.threepids.filter((tp) => tp.medium === "email"); + let emailNotificationsRow; + if (emailThreepids.length === 0) { emailNotificationsRow =