diff options
Diffstat (limited to 'app/assets/javascripts/repository/components/table/parent_row.vue')
-rw-r--r-- | app/assets/javascripts/repository/components/table/parent_row.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/repository/components/table/parent_row.vue b/app/assets/javascripts/repository/components/table/parent_row.vue index 8a081944600..0bc22253bd2 100644 --- a/app/assets/javascripts/repository/components/table/parent_row.vue +++ b/app/assets/javascripts/repository/components/table/parent_row.vue @@ -1,5 +1,6 @@ <script> import { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; +import { joinPaths, buildURLwithRefType } from '~/lib/utils/url_utility'; export default { components: { @@ -8,6 +9,7 @@ export default { directives: { GlTooltip: GlTooltipDirective, }, + inject: ['refType'], props: { commitRef: { type: String, @@ -31,7 +33,9 @@ export default { return splitArray.map((p) => encodeURIComponent(p)).join('/'); }, parentRoute() { - return { path: `/-/tree/${this.commitRef}/${this.parentPath}` }; + const path = joinPaths('/-/tree', this.commitRef, this.parentPath); + + return buildURLwithRefType({ path, refType: this.refType }); }, }, methods: { |