Просмотр исходного кода

don't reset options when updating

Gildas 6 лет назад
Родитель
Сommit
278f0a3442
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      extension/core/bg/config.js

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

@@ -232,7 +232,7 @@ singlefile.extension.core.bg.config = (() => {
 		if (!Object.keys(config.profiles).includes(profileName)) {
 			throw new Error("Profile not found");
 		}
-		config.profiles[profileName] = profile;
+		Object.keys(profile).forEach(key => config.profiles[profileName][key] = profile[key]);
 		await browser.storage.local.set({ profiles: config.profiles });
 	}