From 6df3c3d2271d3674e5e651df2c771b93bd66c551 Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Tue, 1 Aug 2023 08:06:46 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Exports=20may=20not=20be=20defin?= =?UTF-8?q?ed=20in=20article=20theme=20(#186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/rude-icons-kiss.md | 5 +++++ themes/article/app/routes/$.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/rude-icons-kiss.md diff --git a/.changeset/rude-icons-kiss.md b/.changeset/rude-icons-kiss.md new file mode 100644 index 000000000..e66fbdd09 --- /dev/null +++ b/.changeset/rude-icons-kiss.md @@ -0,0 +1,5 @@ +--- +'@myst-theme/article': patch +--- + +Exports may not be defined diff --git a/themes/article/app/routes/$.tsx b/themes/article/app/routes/$.tsx index 712c00e4a..5f21ed614 100644 --- a/themes/article/app/routes/$.tsx +++ b/themes/article/app/routes/$.tsx @@ -224,7 +224,7 @@ export function ArticlePage({ article }: { article: PageLoader }) { const isIndex = article.slug === project?.index; - const downloads = [...(project?.exports ?? []), ...(project?.pages?.[0].exports ?? [])]; + const downloads = [...(project?.exports ?? []), ...(project?.pages?.[0]?.exports ?? [])]; return (
{article.frontmatter.title}