diff options
author | 2024-12-03 16:50:26 +0000 | |
---|---|---|
committer | 2024-12-03 16:50:26 +0000 | |
commit | 557fdae9f33fb2986f2ff047be6192eb4e0b589c (patch) | |
tree | 39e1be828de57f5014a15d0e155b21d664523cb7 | |
parent | 072492982b338e04549ee576ca7d8480be92cc1c (diff) | |
download | astro-557fdae9f33fb2986f2ff047be6192eb4e0b589c.tar.gz astro-557fdae9f33fb2986f2ff047be6192eb4e0b589c.tar.zst astro-557fdae9f33fb2986f2ff047be6192eb4e0b589c.zip |
chore: add null check (#12607)
-rw-r--r-- | examples/with-markdoc/src/pages/index.astro | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/with-markdoc/src/pages/index.astro b/examples/with-markdoc/src/pages/index.astro index 04cef4cad..891b344de 100644 --- a/examples/with-markdoc/src/pages/index.astro +++ b/examples/with-markdoc/src/pages/index.astro @@ -3,6 +3,9 @@ import { getEntry } from 'astro:content'; import Layout from '../layouts/Layout.astro'; const intro = await getEntry('docs', 'intro'); +if (!intro) { + return Astro.redirect('/404'); +} const { Content } = await intro.render(); --- |