From 10d08f2ac9078108da845e9bf9dbf9e12eaa0651 Mon Sep 17 00:00:00 2001 From: Kendall Werts Date: Fri, 10 Jan 2020 15:43:23 -0600 Subject: [PATCH] changed confusing language on sync data check --- src/js/background/sync.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/js/background/sync.js b/src/js/background/sync.js index b56a634..f12eaed 100644 --- a/src/js/background/sync.js +++ b/src/js/background/sync.js @@ -128,16 +128,15 @@ const sync = { sync.storageArea.backup({uuid: deletedUUID}); }, - async checkSyncForMismatches() { + async dataIsReliable() { const cookieStoreIDmap = await this.getCookieStoreIDMap(); const identities = await this.getIdentities(); for (const cookieStoreId of Object.keys(cookieStoreIDmap)) { const match = identities.find(identity => identity.cookieStoreId === cookieStoreId ); - if (!match) return false; // if one has no match, this is bad data. - console.log("Bad Data, skipping"); + if (!match) return false; } return !(Object.entries(cookieStoreIDmap).length === 0); } @@ -202,7 +201,7 @@ const sync = { await assignManager.storageArea.cleanup(); const hasSyncStorage = await sync.storageArea.hasSyncStorage(); - const dataIsReliable = await sync.storageArea.checkSyncForMismatches(); + const dataIsReliable = await sync.storageArea.dataIsReliable(); if (hasSyncStorage && dataIsReliable) await restore(); await sync.storageArea.backup();