Skip to content

Commit

Permalink
this._mouseOverEntry can be null on resizing header/footer
Browse files Browse the repository at this point in the history
seen sometimes when debugging moving rows and cols with comments in
them

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: I20a01f27957b5fa507cd37a1020a93bbba05c630
  • Loading branch information
caolanm committed Oct 29, 2023
1 parent 09c18a4 commit b3ff11b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion browser/src/control/Control.ColumnHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class ColumnHeader extends Header {
const entry = this._mouseOverEntry;
let modifier = 0;

if (this._startSelectionEntry && this._startSelectionEntry.index !== entry.index) {
if (this._startSelectionEntry && entry && this._startSelectionEntry.index !== entry.index) {
this._selectColumn(this._startSelectionEntry.index, modifier);
modifier += UNOModifier.SHIFT;
this._selectColumn(entry.index, modifier);
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.RowHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class RowHeader extends cool.Header {
const entry = this._mouseOverEntry;
let modifier = 0;

if (this._startSelectionEntry && this._startSelectionEntry.index !== entry.index) {
if (this._startSelectionEntry && entry && this._startSelectionEntry.index !== entry.index) {
this._selectRow(this._startSelectionEntry.index, modifier);
modifier += UNOModifier.SHIFT;
this._selectRow(entry.index, modifier);
Expand Down

0 comments on commit b3ff11b

Please sign in to comment.