From 5067afeee95b9a742742333c67837cd35d5d732a Mon Sep 17 00:00:00 2001 From: DominikDoom Date: Wed, 13 Sep 2023 21:55:09 +0200 Subject: [PATCH] Add missing null safety --- javascript/tagAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)