From 6bd77bac7ab610c9759e8ffe80e7bd8b2131f02f Mon Sep 17 00:00:00 2001 From: RealBeepMcJeep Date: Wed, 30 Aug 2023 07:43:38 -0700 Subject: [PATCH] checker thinks this could be undefined, handle it --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index b27223e29..ce79dc348 100644 --- a/server.js +++ b/server.js @@ -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); }