diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 2146156..3f69cc0 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -1002,7 +1002,7 @@ async function autocomplete(textArea, prompt, fixedTag = null) { tagword = tagword.toLowerCase().replace(/[\n\r]/g, ""); // Process all parsers - let resultCandidates = (await processParsers(textArea, prompt)).filter(x => x.length > 0); + let resultCandidates = (await processParsers(textArea, prompt))?.filter(x => x.length > 0); // If one ore more result candidates match, use their results if (resultCandidates && resultCandidates.length > 0) { // Flatten our candidate(s)