Skip to content

Commit

Permalink
Merge pull request #1397 from yabwe/fix-undefined-in-dopaste
Browse files Browse the repository at this point in the history
fix null error on pastedPlain.split
  • Loading branch information
nmielnik authored Dec 19, 2017
2 parents c0bc028 + f1386c7 commit 7d893ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/extensions/paste.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@
return this.cleanPaste(pastedHTML);
}

if (!pastedPlain) {
return;
}

if (!(this.getEditorOption('disableReturn') || (editable && editable.getAttribute('data-disable-return')))) {
paragraphs = pastedPlain.split(/[\r\n]+/g);
// If there are no \r\n in data, don't wrap in <p>
Expand Down

0 comments on commit 7d893ba

Please sign in to comment.