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
2395b4e9
Commit
2395b4e9
authored
Jul 06, 2021
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added return promise resolve
parent
2939b8b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/actions.js
...red/components/sidebar/labels_select_vue/store/actions.js
+10
-8
No files found.
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/actions.js
View file @
2395b4e9
...
...
@@ -21,15 +21,17 @@ export const receiveLabelsFailure = ({ commit }) => {
});
};
export
const
fetchLabels
=
({
state
,
dispatch
})
=>
{
if
(
!
state
.
labelsFetched
)
{
dispatch
(
'
requestLabels
'
);
return
axios
.
get
(
state
.
labelsFetchPath
)
.
then
(({
data
})
=>
{
dispatch
(
'
receiveLabelsSuccess
'
,
data
);
})
.
catch
(()
=>
dispatch
(
'
receiveLabelsFailure
'
));
if
(
state
.
labelsFetched
)
{
return
Promise
.
resolve
();
}
dispatch
(
'
requestLabels
'
);
return
axios
.
get
(
state
.
labelsFetchPath
)
.
then
(({
data
})
=>
{
dispatch
(
'
receiveLabelsSuccess
'
,
data
);
})
.
catch
(()
=>
dispatch
(
'
receiveLabelsFailure
'
));
};
export
const
requestCreateLabel
=
({
commit
})
=>
commit
(
types
.
REQUEST_CREATE_LABEL
);
...
...
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