used coalescing operator to ensure string return in devlog posts

This commit is contained in:
2025-12-21 15:53:08 +00:00
parent 85c3123f2f
commit efff1e47af

View File

@@ -6,9 +6,9 @@ export async function load({ params }) {
const tag: string = params.slug; const tag: string = params.slug;
const postValues = posts.get(tag); const postValues = posts.get(tag);
const content = post.default; const content = post.default;
const title = postValues?.title; const title: string = postValues?.title ?? "";
const date = postValues?.date; const date: string = postValues?.date ?? "";
const bannerAlt = postValues?.bannerAlt; const bannerAlt: string = postValues?.bannerAlt ?? "";
return { return {
content, content,