diff --git a/app/assets/javascripts/app/controllers/_profile/notification.coffee b/app/assets/javascripts/app/controllers/_profile/notification.coffee index d19b8ac21..3de8f3e2b 100644 --- a/app/assets/javascripts/app/controllers/_profile/notification.coffee +++ b/app/assets/javascripts/app/controllers/_profile/notification.coffee @@ -135,12 +135,13 @@ class Index extends App.ControllerSubContent } # check missing channels - for key, value of params['notification_config']['matrix'] - if !value.channel - value.channel = { - email: false - online: true - } + if params['notification_config'] + for key, value of params['notification_config']['matrix'] + if !value.channel + value.channel = { + email: false + online: true + } if !params.notification_config.group_ids || _.isEmpty(params.notification_config.group_ids) params.notification_config.group_ids = ['-']