Skip to content

Commit

Permalink
repo sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Octomerger authored Dec 14, 2020
2 parents 02ca054 + 06364de commit ef3d3ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/path-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ function getPathWithLanguage (href, languageCode) {
// remove the language from the given HREF
// /articles/foo -> /en/articles/foo
function getPathWithoutLanguage (href) {
const newHref = href.match(patterns.hasLanguageCode)
? '/' + href.split('/').slice(2).join('/')
: href

return slash(newHref)
return slash(href.replace(patterns.hasLanguageCode, '/'))
}

function getPathWithoutVersion (href) {
Expand Down

0 comments on commit ef3d3ad

Please sign in to comment.