unbreak categories.json on more complex Liquid (#34125)
This commit is contained in:
@@ -36,8 +36,9 @@ export function getPathWithoutVersion(href) {
|
||||
export function getVersionStringFromPath(href, supportedOnly = false) {
|
||||
href = getPathWithoutLanguage(href)
|
||||
|
||||
// Return immediately if this is a link to the homepage
|
||||
if (href === '/') {
|
||||
// Some URLs don't ever have a version in the URL and it won't be found
|
||||
// if you continue digging deeper. So exit early with the default on these.
|
||||
if (['/', '/categories.json'].includes(href)) {
|
||||
return nonEnterpriseDefaultVersion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user