]> BookStack Code Mirror - bookstack/blobdiff - resources/js/markdown/codemirror.js
Framework: Addressed deprecations
[bookstack] / resources / js / markdown / codemirror.js
index 67b7c68ec869d19d1cddfdf705244fba7bdd8454..9d54c19d754b52b6489bc9aad5bdb7299f4d8542 100644 (file)
@@ -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