1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

promise fix for getLastSync

This commit is contained in:
Kyle Spearrin 2017-11-15 17:03:16 -05:00
parent ac9509b607
commit 77d2218ff9

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) {