Skip to content

Commit

Permalink
Fixes case where endPosition === startPosition angelozerr#73
Browse files Browse the repository at this point in the history
  • Loading branch information
Kronuz committed Jun 20, 2018
1 parent b8daed7 commit 632c6bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function init(modules: { typescript: typeof ts_module }) {
let diagnostic: ts.Diagnostic = {
file: file,
start: problem.getStartPosition().getPosition(),
length: problem.getEndPosition().getPosition() - problem.getStartPosition().getPosition(),
length: problem.getEndPosition().getPosition() - problem.getStartPosition().getPosition() || 1,
messageText: message,
category: category,
source: 'tslint',
Expand Down

0 comments on commit 632c6bc

Please sign in to comment.