Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahs committed Dec 8, 2020
1 parent ba2ebcf commit e2d114b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/rewrite-local-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ function getNewHref (link, languageCode, version) {

// If link is dotcom-only, just get the language code
// Otherwise, get the versioned path with language code
if (!newHref) newHref = link.hasClass('dotcom-only')
? pathUtils.getVersionedPathWithLanguage(href, nonEnterpriseDefaultVersion, languageCode)
: pathUtils.getVersionedPathWithLanguage(href, version, languageCode)
if (!newHref) {
newHref = link.hasClass('dotcom-only')
? pathUtils.getVersionedPathWithLanguage(href, nonEnterpriseDefaultVersion, languageCode)
: pathUtils.getVersionedPathWithLanguage(href, version, languageCode)
}

if (href !== newHref) link.attr('href', newHref)
}

0 comments on commit e2d114b

Please sign in to comment.