From ee8a027b4c78fe3239d1bce30d49a1519b0ab81f Mon Sep 17 00:00:00 2001
From: Travis Ralston <travpc@gmail.com>
Date: Thu, 21 Feb 2019 15:18:11 -0700
Subject: [PATCH] Fix toggle for email notifications

The function doesn't receive an event, it receives a boolean.

Fixes https://github.com/vector-im/riot-web/issues/8837
---
 src/components/views/settings/Notifications.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js
index 03bb4765ed..3b6321dc6f 100644
--- a/src/components/views/settings/Notifications.js
+++ b/src/components/views/settings/Notifications.js
@@ -132,9 +132,9 @@ module.exports = React.createClass({
         });
     },
 
-    onEnableEmailNotificationsChange: function(address, event) {
+    onEnableEmailNotificationsChange: function(address, checked) {
         let emailPusherPromise;
-        if (event.target.checked) {
+        if (checked) {
             const data = {};
             data['brand'] = SdkConfig.get().brand || 'Riot';
             emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);