diff --git a/edit/source-editor.js b/edit/source-editor.js index 138a34f1..ead9e378 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -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);