mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Check for null return from Range#getStartBlock.
This commit is contained in:
parent
02d25f0ef5
commit
10abc3faf8
1 changed files with 2 additions and 2 deletions
|
@ -1658,7 +1658,7 @@
|
|||
getRangeAndRemoveBookmark( range );
|
||||
event.preventDefault();
|
||||
var current = range.getStartBlock(),
|
||||
previous = current.getPreviousBlock();
|
||||
previous = current && current.getPreviousBlock();
|
||||
// Must not be at the very beginning of the text area.
|
||||
if ( previous ) {
|
||||
// If not editable, just delete whole block.
|
||||
|
@ -1723,7 +1723,7 @@
|
|||
getRangeAndRemoveBookmark( range );
|
||||
event.preventDefault();
|
||||
var current = range.getStartBlock(),
|
||||
next = current.getNextBlock();
|
||||
next = current && current.getNextBlock();
|
||||
// Must not be at the very end of the text area.
|
||||
if ( next ) {
|
||||
// If not editable, just delete whole block.
|
||||
|
|
Loading…
Reference in a new issue