Merge pull request #1030 from Tyriar/fix_selection_model_npe

Add a null check to areSelectionValuesReversed
This commit is contained in:
Daniel Imms
2017-10-10 07:50:34 -07:00
committed by GitHub
+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]);
}