From e9949240a850641ce66272d0772be9e18f358ad3 Mon Sep 17 00:00:00 2001 From: oelin <42823429+oelin@users.noreply.github.com> Date: Mon, 30 Jan 2023 12:22:03 +0000 Subject: [PATCH] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ffb25af..94835c3 100644 --- a/index.js +++ b/index.js @@ -57,7 +57,7 @@ export default async function midjourney(prompt, inputs = {}) { }) let output = (await response2.json())?.prediction?.output - if (output.length) { return output } + if (output && output.length) { return output } await sleep(1000) }