From a239ee80bc94c2c36f8fee8d2d5e13e7ef7d10fb Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 5 Jun 2019 00:21:45 -0400 Subject: [PATCH] null checks --- src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs b/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs index 33bb4744d..c55ad6c05 100644 --- a/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs +++ b/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs @@ -6,6 +6,7 @@ using Bit.Core.Abstractions; using Bit.Core.Enums; using Bit.Core.Utilities; using System; +using System.Linq; using System.Threading.Tasks; using Xamarin.Forms; @@ -93,7 +94,7 @@ namespace Bit.App.Pages } // Forced sync if for some reason we have no data after a v1 migration if(_vm.MainPage && !_syncService.SyncInProgress && migratedFromV1.GetValueOrDefault() && - _vm.Ciphers.Count == 0 && _vm.Folders.Count == 0 && + (!_vm.Ciphers?.Any() ?? true) && (!_vm.Folders?.Any() ?? true) && Xamarin.Essentials.Connectivity.NetworkAccess != Xamarin.Essentials.NetworkAccess.None) { var triedV1ReSync = await _storageService.GetAsync(Constants.TriedV1Resync);