diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-11 21:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-11 21:09:10 +0300 |
commit | 6d5a18ac65db79f3a32fb06618a4c4b7a08e777b (patch) | |
tree | 08fa8a2fdcf6bd23ae3a19fce008dcc38629ef2d /app/assets/javascripts/registry | |
parent | 5fc3c77e2b08746bd39bfffae0c5918d63178433 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/registry')
-rw-r--r-- | app/assets/javascripts/registry/explorer/utils.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/registry/explorer/utils.js b/app/assets/javascripts/registry/explorer/utils.js index a3478756c9b..ff86a6b807d 100644 --- a/app/assets/javascripts/registry/explorer/utils.js +++ b/app/assets/javascripts/registry/explorer/utils.js @@ -1,6 +1,8 @@ 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 - const basePath = imageDetails.path.replace(`/${imageDetails.name}`, ''); + const basePath = imageDetails.name + ? imageDetails.path.replace(`/${imageDetails.name}`, '') + : imageDetails.path; return `/${basePath}/registry/repository/${imageDetails.id}/tags${ending}`; }; |