From a7306a77cb3db91ebef22771b9fd5e69f0ed22b0 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 16 Apr 2015 15:27:55 -0400 Subject: [PATCH] (fix) JavaScript error when saving preferences The error was occuring when the user enabled forwarding but no domains constraints were defined in the SOGo's configuration. --- UI/WebServerResources/UIxPreferences.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/WebServerResources/UIxPreferences.js b/UI/WebServerResources/UIxPreferences.js index 8b1f59f9d..bf6a503f5 100644 --- a/UI/WebServerResources/UIxPreferences.js +++ b/UI/WebServerResources/UIxPreferences.js @@ -77,9 +77,9 @@ function savePreferences(sender) { showAlertDialog(_("Please specify an address to which you want to forward your messages.")); sendForm = false; } - + // We check if we can only to internal/external addresses. - var constraints = parseInt(forwardConstraints); + var constraints = (typeof forwardConstraints != "undefined") && parseInt(forwardConstraints); if (constraints > 0) { // We first extract the list of 'known domains' to SOGo