Skip to content

Commit c3883a4

Browse files
refactor(vscode): remove redundant null coalescing operators
1 parent 8c4d407 commit c3883a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

calm-plugins/vscode/src/features/validation/validation-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ export class ValidationService implements vscode.Disposable {
292292

293293
if (output.line_start !== undefined && output.line_end !== undefined) {
294294
// ValidationOutput uses 1-based line numbers
295-
const startLine = Math.max(0, (output.line_start ?? 1) - 1)
296-
const endLine = Math.max(0, (output.line_end ?? 1) - 1)
295+
const startLine = Math.max(0, output.line_start - 1)
296+
const endLine = Math.max(0, output.line_end - 1)
297297
const startChar = output.character_start ?? 0
298298
const endChar = output.character_end ?? doc.lineAt(endLine).text.length
299299

0 commit comments

Comments
 (0)