diff --git a/src/js/background/assignManager.js b/src/js/background/assignManager.js index 41a787c..eefbbda 100644 --- a/src/js/background/assignManager.js +++ b/src/js/background/assignManager.js @@ -89,13 +89,13 @@ window.assignManager = { return; }, - async remove(pageUrlorUrlKey) { + async remove(pageUrlorUrlKey, shouldSync = true) { const siteStoreKey = this.getSiteStoreKey(pageUrlorUrlKey); // When we remove an assignment we should clear all the exemptions this.removeExempted(pageUrlorUrlKey); await this.area.remove([siteStoreKey]); const syncEnabled = await this.getSyncEnabled(); - if (syncEnabled) await sync.storageArea.backup({siteStoreKey}); + if (shouldSync && syncEnabled) await sync.storageArea.backup({siteStoreKey}); return; }, diff --git a/src/js/background/sync.js b/src/js/background/sync.js index b34ea00..6dfb629 100644 --- a/src/js/background/sync.js +++ b/src/js/background/sync.js @@ -493,9 +493,9 @@ async function reconcileSiteAssignments() { await sync.storageArea.getDeletedSiteList(); for(const siteStoreKey of deletedSiteList) { if (Object.prototype.hasOwnProperty.call(assignedSitesLocal,siteStoreKey)) { - assignManager + await assignManager .storageArea - .remove(siteStoreKey); + .remove(siteStoreKey, false); } }