diff --git a/manage/config-dialog.js b/manage/config-dialog.js index c609d436..0661c333 100644 --- a/manage/config-dialog.js +++ b/manage/config-dialog.js @@ -164,7 +164,7 @@ function configDialog(style) { return; } saving = true; - return BG.usercssHelper.save(style) + return BG.usercssHelper.save(BG.deepCopy(style)) .then(saved => { varsInitial = getInitialValues(deepCopy(saved.usercssData.vars)); vars.forEach(va => onchange({target: va.input, justSaved: true})); diff --git a/popup/popup.js b/popup/popup.js index 9fb0fed6..f15ce92c 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -361,7 +361,7 @@ Object.assign(handleEvent, { if (styleIsUsercss) { getStylesSafe({id: styleId}).then(([style]) => { hotkeys.setState(false); - configDialog(style).then(() => { + configDialog(deepCopy(style)).then(() => { hotkeys.setState(true); }); });