mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
Bugfix: startBlock could be null
This commit is contained in:
parent
663fb1485a
commit
e6ea47e75f
1 changed files with 5 additions and 0 deletions
5
vendors/squire/build/squire-raw.js
vendored
5
vendors/squire/build/squire-raw.js
vendored
|
@ -1012,8 +1012,13 @@ const
|
|||
rangeDoesStartAtBlockBoundary = ( range, root ) => {
|
||||
let startContainer = range.startContainer;
|
||||
let startOffset = range.startOffset;
|
||||
let startBlock = getStartBlockOfRange( range, root );
|
||||
let nodeAfterCursor;
|
||||
|
||||
if (!startBlock) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If in the middle or end of a text node, we're not at the boundary.
|
||||
if ( startContainer.nodeType === TEXT_NODE ) {
|
||||
if ( startOffset ) {
|
||||
|
|
Loading…
Reference in a new issue