diff --git a/edit/codemirror-editing-hooks.js b/edit/codemirror-editing-hooks.js index 39773e45..dfe0b831 100644 --- a/edit/codemirror-editing-hooks.js +++ b/edit/codemirror-editing-hooks.js @@ -34,7 +34,7 @@ onDOMscriptReady('/codemirror.js').then(() => { }); CodeMirror.defineInitHook(cm => { - if (prefs.get('editor.livePreview')) { + if (prefs.get('editor.livePreview') && styleId) { cm.on('changes', updatePreview); } if (prefs.get('editor.autocompleteOnTyping')) {