Skip to content

Commit

Permalink
fixed view transitions on blog posts not having slug passed to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-512 committed May 5, 2024
1 parent fef87ed commit 62f6e33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/blog/[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const load: PageLoad = async ({ params }) => {
const blogPost = await import(`../../../blog/${slug}.md`);
return {
content: blogPost.default,
metadata: blogPost.metadata as BlogPost
metadata: { ...blogPost.metadata, slug } satisfies BlogPost
};
} catch (e) {
error(404, `Could not find ${slug}`);
Expand Down

0 comments on commit 62f6e33

Please sign in to comment.