mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-21 23:03:11 -05:00
Fix crash extracting contents of range
endContainer can be null here.
This commit is contained in:
parent
af26ba85d2
commit
3c8f0cd89b
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ const extractContentsOfRange = (
|
|||
}
|
||||
|
||||
// Merge text nodes if adjacent
|
||||
node = endContainer.previousSibling;
|
||||
node = endContainer && endContainer.previousSibling;
|
||||
if (node && node instanceof Text && endContainer instanceof Text) {
|
||||
endOffset = node.length;
|
||||
node.appendData(endContainer.data);
|
||||
|
|
Loading…
Reference in a new issue