Fix keyword name check for single element dicts

(important for user defined mappings with a unique hash)
This commit is contained in:
DominikDoom
2023-07-22 13:41:48 +02:00
parent 40d9fc1079
commit f1d911834b
2 changed files with 4 additions and 3 deletions

View File

@@ -452,9 +452,9 @@ async function insertTextAtCursor(textArea, result, tagword, tabCompletedWithout
let name = result.text + ".safetensors";
if (nameDict) {
if (nameDict.size > 1)
if (nameDict.has(name))
keywords = nameDict.get(name);
else
else
keywords = nameDict.get("none");
}