Skip to content

Commit 68b280a

Browse files
authored
Merge pull request #12296 from github/repo-sync
repo sync
2 parents 9e9c180 + d8e3e6d commit 68b280a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/render-content/plugins/rewrite-local-links.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import removeFPTFromPath from '../../remove-fpt-from-path.js'
1010
import readJsonFile from '../../read-json-file.js'
1111
const supportedVersions = Object.keys(allVersions)
1212
const supportedPlans = Object.values(allVersions).map((v) => v.plan)
13-
const externalRedirects = Object.keys(readJsonFile('./lib/redirects/external-sites.json'))
13+
const externalRedirects = readJsonFile('./lib/redirects/external-sites.json')
1414

1515
// Matches any <a> tags with an href that starts with `/`
1616
const matcher = (node) =>
@@ -41,7 +41,7 @@ function getNewHref(node, languageCode, version) {
4141
// Exceptions to link rewriting
4242
if (href.startsWith('/assets')) return
4343
if (href.startsWith('/public')) return
44-
if (externalRedirects.includes(href)) return
44+
if (href in externalRedirects) return
4545

4646
let newHref = href
4747
// If the link has a hardcoded plan or version in it, do not update other than adding a language code

0 commit comments

Comments
 (0)