From e68e7389ddc48190e2793161ce2787d1caf1fbdf Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Sat, 15 Oct 2022 15:15:13 +0200 Subject: [PATCH] Fix for empty wildcard or embed lines showing in results list --- javascript/tagAutocomplete.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index f364185..d69911d 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -497,6 +497,7 @@ onUiUpdate(function () { if (wildcardFiles.length === 0 && acConfig.useWildcards) { try { wildcardFiles = readFile("file/tags/temp/wc.txt").split("\n") + .filter(x => x.trim().length > 0) // Remove empty lines .map(x => x.trim().replace(".txt", "")); // Remove file extension & newlines wildcardFiles.forEach(fName => { @@ -515,6 +516,7 @@ onUiUpdate(function () { if (embeddings.length === 0 && acConfig.useEmbeddings) { try { embeddings = readFile("file/tags/temp/emb.txt").split("\n") + .filter(x => x.trim().length > 0) // Remove empty lines .map(x => x.replace(".bin", "").replace(".pt", "")); // Remove file extensions } catch (e) { console.error("Error loading embeddings.txt: " + e);