Improved error handling.

This commit is contained in:
Martin Edenhofer 2017-08-15 21:32:53 +02:00
parent c6fec78bf9
commit fde8d11b5f

View file

@ -104,13 +104,15 @@
// break <blockquote> after enter on empty line
sel = window.getSelection()
if (sel) {
node = $(sel.anchorNode)
if (node.parent().is('blockquote')) {
if (node && node.parent() && node.parent().is('blockquote')) {
e.preventDefault()
document.execCommand('Insertparagraph')
document.execCommand('Outdent')
return
}
}
// behavior to enter new line on alt+enter
// on alt + enter not realy newline is fired, to make