fix(): fallback value when object is not set

This commit is contained in:
Eduardo Roth
2023-12-19 17:00:39 -06:00
parent 1631a51894
commit 33b63f4e13

View File

@@ -2,7 +2,7 @@
import type { Props } from '@astrojs/starlight/props';
import Default from '@astrojs/starlight/components/PageTitle.astro';
const {label: challengeLabel, number: challengeNumber} = Astro.props.entry.data.challenge;
const {label: challengeLabel, number: challengeNumber} = Astro.props.entry.data.challenge ?? {};
---