From c191a7e1cf7c427fc11926e67d35f8fc784bc291 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Sun, 28 Aug 2016 22:10:14 -0700 Subject: [PATCH] null check for ie11 --- modules/clipboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/clipboard.js b/modules/clipboard.js index d542b6d96b..1fc724960c 100644 --- a/modules/clipboard.js +++ b/modules/clipboard.js @@ -116,9 +116,9 @@ class Clipboard extends Module { if (e.defaultPrevented) return; let range = this.quill.getSelection(); let delta = new Delta().retain(range.index).delete(range.length); - let types = e.clipboardData.types; + let types = e.clipboardData ? e.clipboardData.types : null; if ((types instanceof DOMStringList && types.contains("text/html")) || - (types.indexOf && types.indexOf('text/html') !== -1)) { + (types && types.indexOf && types.indexOf('text/html') !== -1)) { this.container.innerHTML = e.clipboardData.getData('text/html'); paste.call(this); e.preventDefault();