diff options
author | Mark Chao <mchao@gitlab.com> | 2018-10-15 10:56:29 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-10-15 10:56:29 +0300 |
commit | b4297573c0c55eb3bb66c98dfe1457028edfd5dc (patch) | |
tree | 37a8af0ec5af355574d97ede0f666a5328759061 /app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue | |
parent | 0a89c0b8641e8171c37e45bf9871cd3aea1a2483 (diff) |
Only display merge commit SHA when it exists
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue index 8184ef33022..c19b67f00fa 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue @@ -162,18 +162,20 @@ <span class="label-branch"> <a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a> </span> - with - <a - :href="mr.mergeCommitPath" - class="commit-sha js-mr-merged-commit-sha" - v-text="mr.shortMergeCommitSha" - > - </a> - <clipboard-button - :title="__('Copy commit SHA to clipboard')" - :text="mr.mergeCommitSha" - css-class="btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha" - /> + <template v-if="mr.mergeCommitSha"> + with + <a + :href="mr.mergeCommitPath" + class="commit-sha js-mr-merged-commit-sha" + v-text="mr.shortMergeCommitSha" + > + </a> + <clipboard-button + :title="__('Copy commit SHA to clipboard')" + :text="mr.mergeCommitSha" + css-class="btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha" + /> + </template> </p> <p v-if="mr.sourceBranchRemoved"> {{ s__("mrWidget|The source branch has been removed") }} |