From 3ea720c9373f036fb1faab7fbf9cfd3c77d4f877 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 22 Mar 2018 01:03:40 +0100 Subject: [PATCH] Check if the event exists in move command. Fixes #710 --- src/commands/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/index.js b/src/commands/index.js index c56f2607e..59f7538c4 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -147,7 +147,7 @@ module.exports = () => { const event = opts && opts.event; const sel = ed.getSelected(); const toolbarStyle = ed.Canvas.getToolbarEl().style; - const nativeDrag = event.type == 'dragstart'; + const nativeDrag = event && event.type == 'dragstart'; const hideTlb = () => { toolbarStyle.display = 'none';