Skip to content

Commit 840d182

Browse files
committed
Merge branch 'support-hardcoded-version-or-plan-in-link' of github.com:github/docs-internal into support-hardcoded-version-or-plan-in-link
2 parents 7b093e9 + dbca95f commit 840d182

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rewrite-local-links.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function getNewHref (link, languageCode, version) {
3535
// /enterprise-server/rest/reference/oauth-authorizations (this redirects to the latest version)
3636
// /enterprise-server@latest/rest/reference/oauth-authorizations (this redirects to the latest version)
3737
const firstLinkSegment = href.split('/')[1]
38-
if (supportedPlans.includes(firstLinkSegment) || supportedVersions.includes(firstLinkSegment) || firstLinkSegment === 'enterprise-server@latest') {
38+
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].includes(firstLinkSegment)) {
3939
newHref = pathUtils.getPathWithLanguage(href, languageCode)
4040
}
4141

0 commit comments

Comments
 (0)