Преглед изворни кода

clone data when creating a new profile (fix #276)

Former-commit-id: 14e8e24b128af8f057a2ff6a641b7e9a19655682
Gildas пре 6 година
родитељ
комит
eebae79bbe
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      extension/core/bg/config.js

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

@@ -217,7 +217,7 @@ singlefile.extension.core.bg.config = (() => {
 		if (Object.keys(config.profiles).includes(profileName)) {
 			throw new Error("Duplicate profile name");
 		}
-		config.profiles[profileName] = config.profiles[fromProfileName];
+		config.profiles[profileName] = JSON.parse(JSON.stringify(config.profiles[fromProfileName]));
 		await browser.storage.local.set({ profiles: config.profiles });
 	}