deep-copy style for popup's configDialog

see #298
This commit is contained in:
tophf 2017-12-10 08:10:33 +03:00
parent 242e3384b2
commit 522a2bdab3
2 changed files with 2 additions and 2 deletions

View File

@ -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}));

View File

@ -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);
});
});