Add a null check to areSelectionValuesReversed
See Microsoft/vscode#35601
This commit is contained in:
@@ -97,6 +97,9 @@ export class SelectionModel {
|
|||||||
public areSelectionValuesReversed(): boolean {
|
public areSelectionValuesReversed(): boolean {
|
||||||
const start = this.selectionStart;
|
const start = this.selectionStart;
|
||||||
const end = this.selectionEnd;
|
const end = this.selectionEnd;
|
||||||
|
if (!start || !end) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return start[1] > end[1] || (start[1] === end[1] && start[0] > end[0]);
|
return start[1] > end[1] || (start[1] === end[1] && start[0] > end[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user