Changes:
- Added default value to cleanSlug for simpler structure. - Removed Nullish coalescing operator,
This commit is contained in:
@ -14,7 +14,7 @@ const createPath = (...params: string[]) => {
|
||||
|
||||
const BASE_PATHNAME = SITE.basePathname;
|
||||
|
||||
export const cleanSlug = (text: string) =>
|
||||
export const cleanSlug = (text = '') =>
|
||||
trimSlash(text)
|
||||
.split('/')
|
||||
.map((slug) => slugify(slug))
|
||||
|
Reference in New Issue
Block a user