Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1ead1684
Commit
1ead1684
authored
Sep 29, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing Jest specs
This was caused by a Vuex store getting setup when it didn't need to be setup.
parent
46c67eb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
20 deletions
+27
-20
app/assets/javascripts/code_navigation/index.js
app/assets/javascripts/code_navigation/index.js
+7
-3
app/assets/javascripts/code_navigation/store/index.js
app/assets/javascripts/code_navigation/store/index.js
+6
-5
app/assets/javascripts/diffs/store/actions.js
app/assets/javascripts/diffs/store/actions.js
+14
-12
No files found.
app/assets/javascripts/code_navigation/index.js
View file @
1ead1684
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
s
tore
from
'
./store
'
;
import
createS
tore
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
({
...
...
app/assets/javascripts/code_navigation/store/index.js
View file @
1ead1684
...
...
@@ -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
(),
});
app/assets/javascripts/diffs/store/actions.js
View file @
1ead1684
...
...
@@ -103,18 +103,20 @@ export const fetchDiffFilesBatch = ({ commit, state, dispatch }) => {
commit
(
types
.
VIEW_DIFF_FILE
,
state
.
diffFiles
[
0
].
file_hash
);
}
// eslint-disable-next-line promise/catch-or-return,promise/no-nesting
import
(
'
~/code_navigation
'
).
then
(
m
=>
m
.
default
({
blobs
:
state
.
diffFiles
.
filter
(
f
=>
f
.
code_navigation_path
)
.
map
(
f
=>
({
path
:
f
.
new_path
,
codeNavigationPath
:
f
.
code_navigation_path
,
})),
definitionPathPrefix
:
state
.
definitionPathPrefix
,
}),
);
if
(
state
.
diffFiles
?.
length
)
{
// eslint-disable-next-line promise/catch-or-return,promise/no-nesting
import
(
'
~/code_navigation
'
).
then
(
m
=>
m
.
default
({
blobs
:
state
.
diffFiles
.
filter
(
f
=>
f
.
code_navigation_path
)
.
map
(
f
=>
({
path
:
f
.
new_path
,
codeNavigationPath
:
f
.
code_navigation_path
,
})),
definitionPathPrefix
:
state
.
definitionPathPrefix
,
}),
);
}
}
return
pagination
.
next_page
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment