Skip to content

Commit

Permalink
updating NextJs pages typescript warning
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Jul 15, 2024
1 parent dfe2a5f commit 9180d8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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 default errorHandler(handler);

0 comments on commit 9180d8f

Please sign in to comment.