Update javascript/tagAutocomplete.js

Co-authored-by: DominikDoom <34448969+DominikDoom@users.noreply.github.com>
pull/313/head
undefined 2025-01-15 19:04:25 +08:00 committed by GitHub
parent 9d7d194d61
commit bac95a9609
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -672,11 +672,11 @@ function addResultsToList(textArea, results, tagword, resetList) {
let nextLength = Math.min(results.length, resultCount + TAC_CFG.resultStepLength);
const IS_DAN_OR_E621_TAG_FILE = (tagFileName.toLowerCase().startsWith("danbooru") || tagFileName.toLowerCase().startsWith("e621"))
let prompt = "", tagCount = {}
const tagCount = {};
// Indicate if has existed tag before
if(IS_DAN_OR_E621_TAG_FILE) {
prompt = textArea.value.trim()
// Indicate if tag was used before
if (IS_DAN_OR_E621_TAG_FILE) {
const prompt = textArea.value.trim();
const tags = prompt.replace('\n', ',').split(',').map(tag => tag.trim()).filter(tag => tag)
const unsanitizedTags = tags.map(tag => {