fix(title): fix site crash

production status of titles is sometimes null. this commit accounts for that and prevents site from crashing.

https://github.com/zyachel/libremdb/issues/22
This commit is contained in:
zyachel
2022-12-01 22:29:28 +05:30
parent 28d8331ae9
commit dd75df01eb
3 changed files with 8 additions and 6 deletions

View File

@ -58,7 +58,7 @@ const Basic = ({ data, className }: Props) => {
{data.title}
</h1>
<ul className={styles.meta} aria-label="quick facts">
{data.status.id !== 'released' && (
{data.status && data.status.id !== 'released' && (
<li className={styles.meta__text}>{data.status.text}</li>
)}
<li className={styles.meta__text}>{data.type.name}</li>