promise fix for getLastSync

This commit is contained in:
Kyle Spearrin 2017-11-15 17:03:16 -05:00
parent ac9509b607
commit 77d2218ff9
1 changed files with 1 additions and 1 deletions

View File

@ -936,7 +936,7 @@ var bg_isBackground = true,
function fullSync(override) {
override = override || false;
bg_syncService.getLastSync(function (lastSync) {
bg_syncService.getLastSync().then(function (lastSync) {
var syncInternal = 6 * 60 * 60 * 1000; // 6 hours
var lastSyncAgo = new Date() - lastSync;
if (override || !lastSync || lastSyncAgo >= syncInternal) {