checker thinks this could be undefined, handle it
This commit is contained in:
parent
c703b0b25e
commit
6bd77bac7a
|
@ -4375,6 +4375,7 @@ app.post('/horde_generateimage', jsonParser, async (request, response) => {
|
|||
|
||||
if (check.done) {
|
||||
const result = await ai_horde.getImageGenerationStatus(generation.id);
|
||||
if (result.generations === undefined) return response.sendStatus(500);
|
||||
return response.send(result.generations[0].img);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue