From 8cad056b60deda591a55f8b4281992b8d035a6ad Mon Sep 17 00:00:00 2001 From: Jay V Date: Sat, 19 Oct 2024 17:09:49 -0400 Subject: [PATCH] docs: eslint error --- examples/aws-nextjs/components/form.tsx | 2 +- www/src/content/docs/docs/start/aws/nextjs.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/aws-nextjs/components/form.tsx b/examples/aws-nextjs/components/form.tsx index 8a71800f4..adaa22afd 100644 --- a/examples/aws-nextjs/components/form.tsx +++ b/examples/aws-nextjs/components/form.tsx @@ -9,7 +9,7 @@ export default function Form({ url }: { url: string }) { onSubmit={async (e) => { e.preventDefault(); - const file = (e.target as HTMLFormElement).file.files?.[0]!; + const file = (e.target as HTMLFormElement).file.files?.[0] ?? null; const image = await fetch(url, { body: file, diff --git a/www/src/content/docs/docs/start/aws/nextjs.mdx b/www/src/content/docs/docs/start/aws/nextjs.mdx index 1ad917ec2..6d1ca360e 100644 --- a/www/src/content/docs/docs/start/aws/nextjs.mdx +++ b/www/src/content/docs/docs/start/aws/nextjs.mdx @@ -110,7 +110,7 @@ export default function Form({ url }: { url: string }) { onSubmit={async (e) => { e.preventDefault(); - const file = (e.target as HTMLFormElement).file.files?.[0]!; + const file = (e.target as HTMLFormElement).file.files?.[0] ?? null; const image = await fetch(url, { body: file,