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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /app/assets/javascripts/code_navigation
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/assets/javascripts/code_navigation')
-rw-r--r--app/assets/javascripts/code_navigation/index.js10
-rw-r--r--app/assets/javascripts/code_navigation/store/index.js11
2 files changed, 13 insertions, 8 deletions
diff --git a/app/assets/javascripts/code_navigation/index.js b/app/assets/javascripts/code_navigation/index.js
index 362c26ae065..fa5835245bc 100644
--- a/app/assets/javascripts/code_navigation/index.js
+++ b/app/assets/javascripts/code_navigation/index.js
@@ -1,13 +1,17 @@
import Vue from 'vue';
import Vuex from 'vuex';
-import store from './store';
+import createStore from './store';
import App from './components/app.vue';
-Vue.use(Vuex);
-
export default initialData => {
const el = document.getElementById('js-code-navigation');
+ if (!el) return null;
+
+ Vue.use(Vuex);
+
+ const store = createStore();
+
store.dispatch('setInitialData', initialData);
return new Vue({
diff --git a/app/assets/javascripts/code_navigation/store/index.js b/app/assets/javascripts/code_navigation/store/index.js
index fe48f3ac7f5..9b60fc337fe 100644
--- a/app/assets/javascripts/code_navigation/store/index.js
+++ b/app/assets/javascripts/code_navigation/store/index.js
@@ -3,8 +3,9 @@ import createState from './state';
import actions from './actions';
import mutations from './mutations';
-export default new Vuex.Store({
- actions,
- mutations,
- state: createState(),
-});
+export default () =>
+ new Vuex.Store({
+ actions,
+ mutations,
+ state: createState(),
+ });