Skip to content

Commit

Permalink
fixing nextjs app router typescript build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Jul 18, 2024
1 parent 49aa9ca commit 6e893bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function handler(req: NextRequest) {
if (huggingFaceResult.error) throw huggingFaceResult.error;
// Sends response back to Deep Chat using the Response format:
// https://deepchat.dev/docs/connect/#Response
return NextResponse.json({text: huggingFaceResult[0].label});
return NextResponse.json({text: huggingFaceResult[0]?.label || ''});
}

export const POST = errorHandler(handler);

0 comments on commit 6e893bc

Please sign in to comment.