Skip to content

Commit

Permalink
refactor localizedPathFor function for api addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperMekarski authored and damianlegawiec committed May 11, 2021
1 parent ab117b0 commit 432a890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/app/assets/javascripts/spree.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Spree.localizedPathFor = function(path) {
if (pathName.match(/api\/v/)) {
params.set('locale', SPREE_LOCALE)
} else {
pathName = SPREE_LOCALE + '/' + path
pathName = (this.mountedAt()) + SPREE_LOCALE + '/' + path
}
return fullUrl.origin + (this.mountedAt()) + pathName + '?' + params.toString()
return fullUrl.origin + pathName + '?' + params.toString()
}
return Spree.pathFor(path)
}
Expand Down

1 comment on commit 432a890

@zavan
Copy link
Contributor

@zavan zavan commented on 432a890 Jun 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #11014.

Please sign in to comment.