Fix: minor

This commit is contained in:
eight04 2021-12-07 12:29:54 +08:00
parent 7a0d00a4ba
commit cc314b7be0

View File

@ -70,10 +70,10 @@ function SourceEditor() {
messageBoxProxy.alert(t('usercssAvoidOverwriting'), 'danger', t('genericError'));
} else {
res = await API.usercss.editSave({customName, enabled, id, sourceCode});
// Awaiting inside `try` so that exceptions go to our `catch`
if (!id) {
editor.emit('styleChange', res.style, 'new');
}
// Awaiting inside `try` so that exceptions go to our `catch`
await replaceStyle(res.style);
}
showLog(res);