null check on SyncIfNeeded

This commit is contained in:
Kyle Spearrin 2019-08-12 08:51:49 -04:00
parent ce751cfc87
commit 325b557506
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}