We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
initLines
1 parent 24d00f4 commit 54061e9Copy full SHA for 54061e9
apps/oxlint/src-js/plugins/location.ts
@@ -78,7 +78,7 @@ export function initLines(): void {
78
let lastOffset = 0,
79
offset,
80
match;
81
- while ((match = LINE_BREAK_PATTERN.exec(sourceText))) {
+ while ((match = LINE_BREAK_PATTERN.exec(sourceText)) !== null) {
82
offset = match.index;
83
lines.push(sourceText.slice(lastOffset, offset));
84
lineStartOffsets.push((lastOffset = offset + match[0].length));
0 commit comments