Open davyzhang opened 1 year ago
npx tsx example/imagine-ws.ts
run this example 2 times, the second time it will raise an error and exit.
midjourney-api/src/ws.message.ts:113 if (embeds[0].title.includes("continue")) { ^
TypeError: Cannot read properties of undefined (reading 'includes')
I debugged the embeds[0], it doesn't have title the second time
thanks https://github.com/erictik/midjourney-api/commit/208bb96ace1180604e05520e68ebe4adef3b35c7
the code that reproduces this issue or a replay of the bug
npx tsx example/imagine-ws.ts
npx tsx example/imagine-ws.ts
Describe the bug
run this example 2 times, the second time it will raise an error and exit.
error log
midjourney-api/src/ws.message.ts:113 if (embeds[0].title.includes("continue")) { ^
TypeError: Cannot read properties of undefined (reading 'includes')
I debugged the embeds[0], it doesn't have title the second time