Skip to content

Commit 632c6bc

Browse files
committed
Fixes case where endPosition === startPosition angelozerr#73
1 parent b8daed7 commit 632c6bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function init(modules: { typescript: typeof ts_module }) {
101101
let diagnostic: ts.Diagnostic = {
102102
file: file,
103103
start: problem.getStartPosition().getPosition(),
104-
length: problem.getEndPosition().getPosition() - problem.getStartPosition().getPosition(),
104+
length: problem.getEndPosition().getPosition() - problem.getStartPosition().getPosition() || 1,
105105
messageText: message,
106106
category: category,
107107
source: 'tslint',

0 commit comments

Comments
 (0)