Skip to content

Commit

Permalink
fix: exception when styleNode does not have br
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohee Lee authored and sohee-lee7 committed Jun 11, 2019
1 parent 1ebe045 commit 793c3ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/wwTableManager.js
Expand Up @@ -282,8 +282,11 @@ class WwTableManager {
}

const brNode = styleNode.querySelector('br');
const {parentNode: tdNode, nodeName} = styleNode;
if (!brNode) {
return;
}

const {parentNode: tdNode, nodeName} = styleNode;
if (nodeName === 'CODE' && !brNode.previousSibling) {
// cursor is located in the start of text
// Before Enter : <code>|TEST</code>
Expand Down

0 comments on commit 793c3ec

Please sign in to comment.