Skip to content

Commit

Permalink
Update route.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RemusYu committed Apr 5, 2024
1 parent 55d7d5f commit 7333074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/chat/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export async function POST(req) {
async start(controller) {
try {
let jsonList = []; // Initialize an empty list to collect JSON objects
if (updatedDocs.length >= 0) {
if (updatedDocs.length > 0) {
// Loop through the stream and push chunks to the client
for await (const chunk of stream) {

Expand Down

0 comments on commit 7333074

Please sign in to comment.