From bdd8cf68c7093294c5dff94cd98670fc6059e791 Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Thu, 22 Dec 2022 12:39:00 +0100 Subject: [PATCH] Fix show all condition --- javascript/tagAutocomplete.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 3c7389a..29328dd 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -680,10 +680,9 @@ async function autocomplete(textArea, prompt, fixedTag = null) { umiPreviousTags = umiTags; // Show all condition - let currentSubPrompt = umiSubPrompts.find(x => x[0].includes(tagword[0]))[0]; - let showAll = currentSubPrompt.endsWith("[") || currentSubPrompt.endsWith("[--") || currentSubPrompt.endsWith("|"); + let showAll = tagword.endsWith("[") || tagword.endsWith("[--") || tagword.endsWith("|"); - console.log(currentSubPrompt, umiTags, diff, tagCountChange) + console.log(tagword, umiTags, diff, tagCountChange) // Exit early if the user closed the bracket manually if ((!diff || diff.length === 0 || (diff.length === 1 && tagCountChange < 0)) && !showAll) {