From e7d5fff736464a4877226ca579eaf418ec90bfeb Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 7 Sep 2021 12:40:06 +0300 Subject: [PATCH] use normal warning if typo candidate is empty --- edit/source-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/source-editor.js b/edit/source-editor.js index 8829f099..68ad1194 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -329,7 +329,7 @@ function SourceEditor() { } cache = errors.map(({code, index, args, message}) => { const isUnknownMeta = code === 'unknownMeta'; - const typo = isUnknownMeta && args.length === 2 ? 'Typo' : ''; + const typo = isUnknownMeta && args[1] ? 'Typo' : ''; // args[1] may be present but undefined return ({ from: cm.posFromIndex((index || 0) + match.index), to: cm.posFromIndex((index || 0) + match.index),