(fix) add empty settings hashes to prever JS exceptions
parent
a718b87d91
commit
ded467e0a2
|
@ -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]];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue