From 16af360006dd67e246590a41574634a669cf6070 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Fri, 1 Sep 2023 17:21:38 +0200 Subject: [PATCH] fix(notifications): bug with older user profile --- .../js/Preferences/PreferencesController.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UI/WebServerResources/js/Preferences/PreferencesController.js b/UI/WebServerResources/js/Preferences/PreferencesController.js index b4639aafb..e9f56d14a 100644 --- a/UI/WebServerResources/js/Preferences/PreferencesController.js +++ b/UI/WebServerResources/js/Preferences/PreferencesController.js @@ -20,9 +20,11 @@ this.autocomplete = {forward: [], notification: []}; this.mailLabelKeyRE = new RegExp(/^(?!^_\$)[^(){} %*\"\\\\]*?$/); this.emailSeparatorKeys = Preferences.defaults.emailSeparatorKeys; - if (!Preferences.defaults.Notification.notificationMessage) - this.preferences.defaults.Notification.notificationMessage = l('Notification Message', $window.defaultEmailAddresses); - this.preferences.defaults.Notification.notificationTranslated = l('Notification'); + if(this.preferences.defaults.Notification) { + if (this.preferences.defaults.Notification.notificationMessage) + this.preferences.defaults.Notification.notificationMessage = l('Notification Message', $window.defaultEmailAddresses); + this.preferences.defaults.Notification.notificationTranslated = l('Notification'); + } if (Preferences.defaults.SOGoMailAutoMarkAsReadMode == 'delay') this.mailAutoMarkAsReadDelay = Math.max(1, this.preferences.defaults.SOGoMailAutoMarkAsReadDelay); else