mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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 ) => {
|
rangeDoesStartAtBlockBoundary = ( range, root ) => {
|
||||||
let startContainer = range.startContainer;
|
let startContainer = range.startContainer;
|
||||||
let startOffset = range.startOffset;
|
let startOffset = range.startOffset;
|
||||||
|
let startBlock = getStartBlockOfRange( range, root );
|
||||||
let nodeAfterCursor;
|
let nodeAfterCursor;
|
||||||
|
|
||||||
|
if (!startBlock) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// If in the middle or end of a text node, we're not at the boundary.
|
// If in the middle or end of a text node, we're not at the boundary.
|
||||||
if ( startContainer.nodeType === TEXT_NODE ) {
|
if ( startContainer.nodeType === TEXT_NODE ) {
|
||||||
if ( startOffset ) {
|
if ( startOffset ) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue