mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 18:35:25 +00:00
(fix) add empty settings hashes to prever JS exceptions
This commit is contained in:
@@ -255,6 +255,16 @@ static SoProduct *preferencesProduct = nil;
|
||||
forKey: @"PreventInvitationsWhitelist"];
|
||||
}
|
||||
|
||||
// Initialize some default values
|
||||
if (![settings objectForKey: @"Calendar"])
|
||||
[settings setObject: [NSMutableDictionary dictionary] forKey: @"Calendar"];
|
||||
|
||||
if (![settings objectForKey: @"Contact"])
|
||||
[settings setObject: [NSMutableDictionary dictionary] forKey: @"Contact"];
|
||||
|
||||
if (![settings objectForKey: @"Mail"])
|
||||
[settings setObject: [NSMutableDictionary dictionary] forKey: @"Mail"];
|
||||
|
||||
return [self _makeResponse: [[settings source] values]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user