Skip to content

Commit

Permalink
null check for ie11
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Aug 29, 2016
1 parent be24c62 commit c191a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c191a7e

Please sign in to comment.