diff --git a/src/helpers.js b/src/helpers.js index 2b6eac9d..68b3bd3e 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -274,7 +274,7 @@ export async function processESLintMessages(messages, textEditor, showRule) { keep doing so in later uses. */ const msgLine = line - 1 - if (typeof endColumn !== 'undefined' && typeof endLine !== 'undefined') { + if (typeof endColumn === 'number' && typeof endLine === 'number') { eslintFullRange = true // Here we always want the column to be a number msgCol = Math.max(0, column - 1) @@ -283,7 +283,7 @@ export async function processESLintMessages(messages, textEditor, showRule) { } else { // We want msgCol to remain undefined if it was initially so // `generateRange` will give us a range over the entire line - msgCol = typeof column !== 'undefined' ? column - 1 : column + msgCol = typeof column === 'number' ? column - 1 : column } let ret = {