Browse Source

reset sync to false when resetting all the profiles

Gildas 6 years ago
parent
commit
0d91820021
1 changed files with 2 additions and 2 deletions
  1. 2 2
      extension/core/bg/config.js

+ 2 - 2
extension/core/bg/config.js

@@ -412,6 +412,8 @@ singlefile.extension.core.bg.config = (() => {
 		delete tabsData.profileName;
 		await singlefile.extension.core.bg.tabsData.set(tabsData);
 		await configStorage.remove(["profiles", "rules", "maxParallelWorkers"]);
+		await browser.storage.local.set({ sync: false });
+		configStorage = browser.storage.local;
 		await upgrade();
 	}
 
@@ -422,8 +424,6 @@ singlefile.extension.core.bg.config = (() => {
 		}
 		config.profiles[profileName] = DEFAULT_CONFIG;
 		await configStorage.set({ profiles: config.profiles });
-		await browser.storage.local.set({ sync: false });
-		configStorage = browser.storage.local;
 	}
 
 	async function exportConfig() {