Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-07-13 11:13:36 +0300
committerPhil Hughes <me@iamphill.com>2018-07-13 11:13:36 +0300
commit9b9cbb4a1a046d4aa04af94373216fa8fdba79db (patch)
treeeee32a56820ba0b41b42b7555ffa3b6b41295a7d /app
parent246ac064229be24c9f28a3781bc6182cffc221b6 (diff)
fixed test to correctly text relative URLs
doesnt add query param if source & target projects match
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
index a3b1e7d1340..a4c2289c590 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
@@ -1,7 +1,7 @@
<script>
import tooltip from '~/vue_shared/directives/tooltip';
import { n__ } from '~/locale';
-import { webIDEUrl } from '~/lib/utils/url_utility';
+import { mergeUrlParams, webIDEUrl } from '~/lib/utils/url_utility';
import Icon from '~/vue_shared/components/icon.vue';
import clipboardButton from '~/vue_shared/components/clipboard_button.vue';
@@ -43,11 +43,10 @@ export default {
return this.isBranchTitleLong(this.mr.targetBranch);
},
webIdePath() {
- return webIDEUrl(
- `/${this.mr.sourceProjectFullPath}/merge_requests/${this.mr.iid}?target_project=${
- this.mr.targetProjectFullPath
- }`,
- );
+ return mergeUrlParams({
+ target_project: this.mr.sourceProjectFullPath !== this.mr.targetProjectFullPath ?
+ this.mr.targetProjectFullPath : '',
+ }, webIDEUrl(`/${this.mr.sourceProjectFullPath}/merge_requests/${this.mr.iid}`));
},
},
methods: {