- Added default value to cleanSlug for simpler structure.
- Removed Nullish coalescing operator,
This commit is contained in:
Alaev
2023-01-10 12:01:50 +02:00
parent f641767078
commit e90714b9e6
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ const getNormalizedPost = async (post: CollectionEntry<'blog'>): Promise<Post> =
return {
id: id,
slug: cleanSlug(slug.split('/').pop() ?? ''),
slug: cleanSlug(slug.split('/').pop()),
publishDate: new Date(publishDate),
category: cleanSlug(category),