1
0
Fork 0

fix(shared): Issues with sitenav/prebuild

This commit is contained in:
joostdecock 2023-07-26 18:49:54 +02:00
parent 5451e30f98
commit 2c044ffa70
4 changed files with 161 additions and 160 deletions

View file

@ -359,7 +359,7 @@ export const maxPovDepthSlug = (slug, site) => {
* Eg: the user is on page reference/api/part so reference/api is on the way to that page
* In that case, this will return true
*/
export const isSlugPart = (part, slug) => slug.slice(0, part.length) === part
export const isSlugPart = (part, slug) => slug && part && slug.slice(0, part.length) === part
/*
* Makes a properly formated path for the given locale