diff options
Diffstat (limited to 'app/assets/javascripts/contributors/index.js')
-rw-r--r-- | app/assets/javascripts/contributors/index.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/contributors/index.js b/app/assets/javascripts/contributors/index.js index b6063589734..f66133a074d 100644 --- a/app/assets/javascripts/contributors/index.js +++ b/app/assets/javascripts/contributors/index.js @@ -1,12 +1,15 @@ import Vue from 'vue'; import ContributorsGraphs from './components/contributors.vue'; -import store from './stores'; +import { createStore } from './stores'; export default () => { const el = document.querySelector('.js-contributors-graph'); if (!el) return null; + const { projectGraphPath, projectBranch, defaultBranch } = el.dataset; + const store = createStore(defaultBranch); + return new Vue({ el, store, @@ -14,8 +17,8 @@ export default () => { render(createElement) { return createElement(ContributorsGraphs, { props: { - endpoint: el.dataset.projectGraphPath, - branch: el.dataset.projectBranch, + endpoint: projectGraphPath, + branch: projectBranch, }, }); }, |