diff --git a/init.ts b/init.ts index 9fccd891..653a5bec 100644 --- a/init.ts +++ b/init.ts @@ -211,7 +211,7 @@ const JOKES = [ ]; export const handler = (_req: Request, _ctx: HandlerContext): Response => { - const randomIndex = Math.floor(Math.random() * 10); + const randomIndex = Math.floor(Math.random() * JOKES.length); const body = JOKES[randomIndex]; return new Response(body); };