Skip to content

Commit

Permalink
chore: add null check (#12607)
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic authored Dec 3, 2024
1 parent 0724929 commit 557fdae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/with-markdoc/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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();
---

Expand Down

0 comments on commit 557fdae

Please sign in to comment.