used coalescing operator to ensure string return in devlog posts
This commit is contained in:
@@ -6,9 +6,9 @@ export async function load({ params }) {
|
||||
const tag: string = params.slug;
|
||||
const postValues = posts.get(tag);
|
||||
const content = post.default;
|
||||
const title = postValues?.title;
|
||||
const date = postValues?.date;
|
||||
const bannerAlt = postValues?.bannerAlt;
|
||||
const title: string = postValues?.title ?? "";
|
||||
const date: string = postValues?.date ?? "";
|
||||
const bannerAlt: string = postValues?.bannerAlt ?? "";
|
||||
|
||||
return {
|
||||
content,
|
||||
|
||||
Reference in New Issue
Block a user