fix: Set error message when image generation fails in runTrigger
This commit is contained in:
@@ -508,7 +508,8 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{
|
|||||||
const negValue = risuChatParser(effect.negValue,{chara:char})
|
const negValue = risuChatParser(effect.negValue,{chara:char})
|
||||||
const gen = await generateAIImage(effectValue, char, negValue, 'inlay')
|
const gen = await generateAIImage(effectValue, char, negValue, 'inlay')
|
||||||
if(!gen){
|
if(!gen){
|
||||||
return ''
|
setVar(effect.inputVar, 'Error: Image generation failed')
|
||||||
|
break
|
||||||
}
|
}
|
||||||
const imgHTML = new Image()
|
const imgHTML = new Image()
|
||||||
imgHTML.src = gen
|
imgHTML.src = gen
|
||||||
|
|||||||
Reference in New Issue
Block a user