diff --git a/examples/next-ai-rsc-basic/app/action.tsx b/examples/next-ai-rsc-basic/app/action.tsx index 5f68db3b4b58..06316fdc0881 100644 --- a/examples/next-ai-rsc-basic/app/action.tsx +++ b/examples/next-ai-rsc-basic/app/action.tsx @@ -28,7 +28,9 @@ interface UIStateItem { readonly display: React.ReactNode; } -const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); +const openai = new OpenAI({ + apiKey: process.env.OPENAI_API_KEY || '', +}); async function getFlightInfo(flightNumber: string): Promise { return {