mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -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
|
// Merge text nodes if adjacent
|
||||||
node = endContainer.previousSibling;
|
node = endContainer && endContainer.previousSibling;
|
||||||
if (node && node instanceof Text && endContainer instanceof Text) {
|
if (node && node instanceof Text && endContainer instanceof Text) {
|
||||||
endOffset = node.length;
|
endOffset = node.length;
|
||||||
node.appendData(endContainer.data);
|
node.appendData(endContainer.data);
|
||||||
|
|
Loading…
Reference in a new issue