diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-26 15:37:09 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-26 15:37:09 +0100 |
commit | 71d03e7e18827e811a3995925de37e080c3e9723 (patch) | |
tree | bbd172e73548e56c4b278c22067c8a9106bf14a3 /app | |
parent | b172ef2fdc2a12de67bc8228ef156d08b63e9bf6 (diff) | |
download | gitlab-ce-71d03e7e18827e811a3995925de37e080c3e9723.tar.gz |
Move gon ref to the index to avoid depending on gon in any mr widget objects
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/index.js b/app/assets/javascripts/vue_merge_request_widget/index.js index cd65ac069c5..43ef468c303 100644 --- a/app/assets/javascripts/vue_merge_request_widget/index.js +++ b/app/assets/javascripts/vue_merge_request_widget/index.js @@ -4,6 +4,8 @@ import { } from './dependencies'; document.addEventListener('DOMContentLoaded', () => { + gl.mrWidgetData.gitlabLogo = gon.gitlab_logo; + const vm = new Vue(mrWidgetOptions); window.gl.mrWidget = { diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js index 5423613ff49..be2f489df1a 100644 --- a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js +++ b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js @@ -5,7 +5,7 @@ export default class MergeRequestStore { constructor(data) { this.sha = data.diff_head_sha; - this.gitlabLogo = gon.gitlab_logo; + this.gitlabLogo = data.gitlabLogo; this.setData(data); } |