be more flexible so we do not rewrite hardcoded deprecated versions OR supported
This commit is contained in:
@@ -50,7 +50,7 @@ function getNewHref (node, languageCode, version) {
|
||||
// /enterprise-server/rest/reference/oauth-authorizations (this redirects to the latest version)
|
||||
// /enterprise-server@latest/rest/reference/oauth-authorizations (this redirects to the latest version)
|
||||
const firstLinkSegment = href.split('/')[1]
|
||||
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].includes(firstLinkSegment)) {
|
||||
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].some(v => firstLinkSegment.startsWith(v))) {
|
||||
newHref = path.join('/', languageCode, href)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user