fixup eaed0de4: don't enable livepreview for unsaved code

This commit is contained in:
tophf 2018-01-15 19:16:48 +03:00
parent 100f7716fd
commit 0f8bca03b8

View File

@ -34,7 +34,7 @@ onDOMscriptReady('/codemirror.js').then(() => {
}); });
CodeMirror.defineInitHook(cm => { CodeMirror.defineInitHook(cm => {
if (prefs.get('editor.livePreview')) { if (prefs.get('editor.livePreview') && styleId) {
cm.on('changes', updatePreview); cm.on('changes', updatePreview);
} }
if (prefs.get('editor.autocompleteOnTyping')) { if (prefs.get('editor.autocompleteOnTyping')) {