Add a null check to areSelectionValuesReversed

See Microsoft/vscode#35601
This commit is contained in:
Daniel Imms
2017-10-05 11:15:46 -07:00
parent 22af08d86e
commit f36ba01460
+3
View File
@@ -97,6 +97,9 @@ export class SelectionModel {
public areSelectionValuesReversed(): boolean {
const start = this.selectionStart;
const end = this.selectionEnd;
if (!start || !end) {
return false;
}
return start[1] > end[1] || (start[1] === end[1] && start[0] > end[0]);
}