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
This commit is contained in:
Travis Ralston 2019-02-21 15:18:11 -07:00
parent 86c49d5807
commit ee8a027b4c

View file

@ -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);