mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-03-04 21:00:03 +00:00
Add missing null safety
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user