X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/0519e58fbf4e0da0ee42e1954dd159755ee1718c..refs/pull/4815/head:/resources/js/markdown/codemirror.js diff --git a/resources/js/markdown/codemirror.js b/resources/js/markdown/codemirror.js index b615e666b..9d54c19d7 100644 --- a/resources/js/markdown/codemirror.js +++ b/resources/js/markdown/codemirror.js @@ -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