diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index d8d1a74da..d2b076378 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -38,7 +38,8 @@ const defActions = { title: 'Link' }, result: rte => { - const nextSibling = rte.selection().anchorNode.nextSibling; + const anchor = rte.selection().anchorNode; + const nextSibling = anchor && anchor.nextSibling; if (nextSibling && nextSibling.nodeName == 'A') { rte.exec('unlink'); } else {