Skip to content

Commit

Permalink
fix server crash in case of jsdoc-only/-intern errors
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed May 25, 2022
1 parent 0f5b2ed commit d2ee9b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/modes/script/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,8 @@ export function languageServiceIncludesFile(ls: ts.LanguageService, documentUri:
}

function convertRange(document: TextDocument, span: ts.TextSpan): Range {
const startPosition = document.positionAt(span.start);
const endPosition = document.positionAt(span.start + span.length);
const startPosition = document.positionAt(span.start || 0);
const endPosition = document.positionAt((span.start + span.length) || 0);
return Range.create(startPosition, endPosition);
}

Expand Down

0 comments on commit d2ee9b0

Please sign in to comment.