From ccfc0b18f3df48d3959078ea0f1903a24bb2e59a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 23 Aug 2020 22:49:57 +0200 Subject: [PATCH] Fix preview command for tests --- src/commands/view/Preview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/view/Preview.js b/src/commands/view/Preview.js index fecca5c60..b8693f5f1 100644 --- a/src/commands/view/Preview.js +++ b/src/commands/view/Preview.js @@ -22,8 +22,9 @@ export default { }, tglEffects(on) { + const { em } = this; const mthEv = on ? 'on' : 'off'; - this.em[mthEv]('run:tlb-move:before', this.preventDrag); + em && em[mthEv]('run:tlb-move:before', this.preventDrag); }, run(editor, sender) {