diff options
Diffstat (limited to 'app/assets/javascripts/registry/explorer/utils.js')
-rw-r--r-- | app/assets/javascripts/registry/explorer/utils.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/registry/explorer/utils.js b/app/assets/javascripts/registry/explorer/utils.js index 2c89d508c31..a48da51caae 100644 --- a/app/assets/javascripts/registry/explorer/utils.js +++ b/app/assets/javascripts/registry/explorer/utils.js @@ -1,3 +1,5 @@ +import { joinPaths } from '~/lib/utils/url_utility'; + export const pathGenerator = (imageDetails, ending = '?format=json') => { // this method is a temporary workaround, to be removed with graphql implementation // https://gitlab.com/gitlab-org/gitlab/-/issues/276432 @@ -12,5 +14,12 @@ export const pathGenerator = (imageDetails, ending = '?format=json') => { return acc; }, []) .join('/'); - return `/${basePath}/registry/repository/${imageDetails.id}/tags${ending}`; + + return joinPaths( + window.gon.relative_url_root, + `/${basePath}`, + '/registry/repository/', + `${imageDetails.id}`, + `tags${ending}`, + ); }; |