Fix: manually updated usercss doesn't keep settings
This commit is contained in:
parent
1d829fe8f5
commit
94a7e0cdb5
|
@ -361,12 +361,19 @@ Object.assign(handleEvent, {
|
|||
},
|
||||
|
||||
update(event, entry) {
|
||||
// update everything but name
|
||||
saveStyleSafe(Object.assign(entry.updatedCode, {
|
||||
const request = Object.assign(entry.updatedCode, {
|
||||
id: entry.styleId,
|
||||
name: null,
|
||||
reason: 'update',
|
||||
}));
|
||||
});
|
||||
if (entry.updatedCode.usercssData) {
|
||||
onBackgroundReady().then(() =>
|
||||
BG.usercssHelper.save(request)
|
||||
);
|
||||
} else {
|
||||
// update everything but name
|
||||
request.name = null;
|
||||
saveStyleSafe(request);
|
||||
}
|
||||
},
|
||||
|
||||
delete(event, entry) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user