From 325b557506f12edb6c18ddf415986047b3bd5aa2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 12 Aug 2019 08:51:49 -0400 Subject: [PATCH] null check on SyncIfNeeded --- src/App/App.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index 699ddac3e..accf394c0 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -367,7 +367,7 @@ namespace Bit.App Task.Run(async () => { var lastSync = await _syncService.GetLastSyncAsync(); - if(DateTime.UtcNow - lastSync > TimeSpan.FromMinutes(30)) + if(lastSync == null || ((DateTime.UtcNow - lastSync) > TimeSpan.FromMinutes(30))) { await _syncService.FullSyncAsync(false); }