1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-10 13:23:39 +00:00

null checks

This commit is contained in:
Kyle Spearrin
2019-04-19 15:18:26 -04:00
parent 480f954433
commit 2637587cf7
3 changed files with 6 additions and 6 deletions

View File

@@ -93,8 +93,8 @@ namespace Bit.Core.Services
var userId = await _userService.GetUserIdAsync();
var collections = await _storageService.GetAsync<Dictionary<string, CollectionData>>(
string.Format(Keys_CollectionsFormat, userId));
var response = collections.Select(c => new Collection(c.Value));
return response.ToList();
var response = collections?.Select(c => new Collection(c.Value));
return response?.ToList() ?? new List<Collection>();
}
// TODO: sequentialize?