Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Remove checking position equality when sorting ranges of selected tab…
Browse files Browse the repository at this point in the history
…le cells.
  • Loading branch information
jodator committed Apr 14, 2020
1 parent 01d23cb commit 7213f93
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ function compareRangeOrder( rangeA, rangeB ) {
const posA = rangeA.start;
const posB = rangeB.start;

if ( posA.isEqual( posB ) ) {
return 0;
}

// Checking for equal position (returning 0) is not needed because this would be either:
// a. Intersecting range (not allowed by model)
// b. Collapsed range on the same position (allowed by model but should not happen).
return posA.isBefore( posB ) ? -1 : 1;
}

0 comments on commit 7213f93

Please sign in to comment.