From 632c6bca3943478dd6dab86eaf0a454f682f649e Mon Sep 17 00:00:00 2001 From: "German M. Bravo" Date: Wed, 20 Jun 2018 15:42:14 -0500 Subject: [PATCH] Fixes case where endPosition === startPosition #73 --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ba72bf0..425a723 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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',