Skip to content

Commit c3479f6

Browse files
More clean up
1 parent 9de4fdb commit c3479f6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/cursorless-engine/src/processTargets/modifiers/HeadTailStage.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,10 @@ class BoundedLineStage implements ModifierStage {
5757
const line = this.getContainingLine(target);
5858
const pairInterior = this.getContainingPairInterior(target);
5959

60-
if (pairInterior == null) {
61-
return [line];
62-
}
63-
64-
const intersection = line.contentRange.intersection(
65-
pairInterior.contentRange,
66-
);
60+
const intersection =
61+
pairInterior != null
62+
? line.contentRange.intersection(pairInterior.contentRange)
63+
: null;
6764

6865
if (intersection == null || intersection.isEmpty) {
6966
return [line];

0 commit comments

Comments
 (0)