Skip to content

Commit bd35821

Browse files
committed
test(node) fix wrong type assertion
1 parent cc4305a commit bd35821

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/node/src/integrations/contextlines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function getContextLinesFromFile(path: string, ranges: ReadlineRange[], output:
134134
let lineNumber = 0;
135135
let currentRangeIndex = 0;
136136
const range = ranges[currentRangeIndex];
137-
if (typeof range !== 'number') {
137+
if (range === undefined) {
138138
// We should never reach this point, but if we do, we should resolve the promise to prevent it from hanging.
139139
resolve();
140140
return;
@@ -175,7 +175,7 @@ function getContextLinesFromFile(path: string, ranges: ReadlineRange[], output:
175175
}
176176
currentRangeIndex++;
177177
const range = ranges[currentRangeIndex];
178-
if (typeof range !== 'number') {
178+
if (range === undefined) {
179179
// This should never happen as it means we have a bug in the context.
180180
lineReaded.close();
181181
lineReaded.removeAllListeners();

0 commit comments

Comments
 (0)