(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.
This commit is contained in:
Francis Lachapelle
2015-04-16 15:27:55 -04:00
parent cdc74e4984
commit a7306a77cb

View File

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