diff --git a/edit/source-editor.js b/edit/source-editor.js index 28ec7f49..e14f74a9 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -215,7 +215,7 @@ function createSourceEditor(style) { }) .catch(err => { if (err.handled) return; - if (err.message === t('styleMissingMeta', 'name')) { + if (err.code === 'missingMandatory' && err.args.includes('name')) { messageBox.confirm(t('usercssReplaceTemplateConfirmation')).then(ok => ok && chromeSync.setLZValue('usercssTemplate', code) .then(() => chromeSync.getLZValue('usercssTemplate'))