X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e711290d8b1ce06b38e0560248806e8de2077870..refs/pull/4815/head:/resources/js/markdown/codemirror.js diff --git a/resources/js/markdown/codemirror.js b/resources/js/markdown/codemirror.js index 67b7c68ec..9d54c19d7 100644 --- a/resources/js/markdown/codemirror.js +++ b/resources/js/markdown/codemirror.js @@ -1,6 +1,6 @@ import {provideKeyBindings} from './shortcuts'; import {debounce} from '../services/util'; -import Clipboard from '../services/clipboard'; +import {Clipboard} from '../services/clipboard'; /** * Initiate the codemirror instance for the markdown editor. @@ -21,7 +21,9 @@ export async function init(editor) { const onScrollDebounced = debounce(editor.actions.syncDisplayPosition.bind(editor.actions), 100, false); let syncActive = editor.settings.get('scrollSync'); - editor.settings.onChange('scrollSync', val => syncActive = val); + editor.settings.onChange('scrollSync', val => { + syncActive = val; + }); const domEventHandlers = { // Handle scroll to sync display view