1
0
mirror of synced 2025-12-25 02:17:36 -05:00

Merge branch 'support-hardcoded-version-or-plan-in-link' of github.com:github/docs-internal into support-hardcoded-version-or-plan-in-link

This commit is contained in:
Sarah Schneider
2020-12-14 15:45:18 -05:00

View File

@@ -35,7 +35,7 @@ function getNewHref (link, 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.includes(firstLinkSegment) || supportedVersions.includes(firstLinkSegment) || firstLinkSegment === 'enterprise-server@latest') {
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].includes(firstLinkSegment)) {
newHref = pathUtils.getPathWithLanguage(href, languageCode)
}