diff options
Diffstat (limited to 'app/assets/javascripts/pages/projects/blob/show/index.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/blob/show/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/pages/projects/blob/show/index.js b/app/assets/javascripts/pages/projects/blob/show/index.js index 2fc9a111405..740fdb8a96a 100644 --- a/app/assets/javascripts/pages/projects/blob/show/index.js +++ b/app/assets/javascripts/pages/projects/blob/show/index.js @@ -1,4 +1,5 @@ import Vue from 'vue'; +import Vuex from 'vuex'; import VueApollo from 'vue-apollo'; import VueRouter from 'vue-router'; import TableOfContents from '~/blob/components/table_contents.vue'; @@ -11,7 +12,9 @@ import initWebIdeLink from '~/pages/projects/shared/web_ide_link'; import commitPipelineStatus from '~/projects/tree/components/commit_pipeline_status_component.vue'; import BlobContentViewer from '~/repository/components/blob_content_viewer.vue'; import '~/sourcegraph/load'; +import createStore from '~/code_navigation/store'; +Vue.use(Vuex); Vue.use(VueApollo); Vue.use(VueRouter); @@ -29,6 +32,7 @@ if (viewBlobEl) { // eslint-disable-next-line no-new new Vue({ el: viewBlobEl, + store: createStore(), router, apolloProvider, provide: { @@ -78,7 +82,7 @@ GpgBadges.fetch(); const codeNavEl = document.getElementById('js-code-navigation'); -if (codeNavEl) { +if (codeNavEl && !viewBlobEl) { const { codeNavigationPath, blobPath, definitionPathPrefix } = codeNavEl.dataset; // eslint-disable-next-line promise/catch-or-return |