Fix: save name when updating usercss
This commit is contained in:
parent
94a7e0cdb5
commit
aa71984fd3
|
@ -139,14 +139,16 @@ var updater = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function maybeSave(json) {
|
function maybeSave(json) {
|
||||||
const doSave = json.usercssData ? usercssHelper.save : saveStyle;
|
|
||||||
json.id = style.id;
|
json.id = style.id;
|
||||||
// no need to compare section code for usercss, they are built dynamically
|
if (!save) {
|
||||||
return !save ? json :
|
return json;
|
||||||
doSave(Object.assign(json, {
|
}
|
||||||
name: null, // keep local name customizations
|
json.reason = 'update';
|
||||||
reason: 'update',
|
if (json.usercssData) {
|
||||||
}));
|
return usercssHelper.save(json);
|
||||||
|
}
|
||||||
|
json.name = null; // keep local name customizations
|
||||||
|
return saveStyle(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
function styleJSONseemsValid(json) {
|
function styleJSONseemsValid(json) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user