From 239e46ba1d84b41ef62f37b91fea1b7164820774 Mon Sep 17 00:00:00 2001 From: GameDog9988 Date: Thu, 21 Sep 2023 21:24:07 -0400 Subject: [PATCH] feat: add extra check ensuring images returned is an array --- apps/client/src/components/game/prompt.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/components/game/prompt.tsx b/apps/client/src/components/game/prompt.tsx index 92d99e10..30c8b556 100644 --- a/apps/client/src/components/game/prompt.tsx +++ b/apps/client/src/components/game/prompt.tsx @@ -117,7 +117,7 @@ const Prompt = ({ console.timeEnd("Execution Time"); - if (images && images.length === 2) { + if (images && Array.isArray(images) && images.length === 2) { if (userId) { const generations = await createGenerations({ userId,