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:
Diffstat (limited to 'app/assets/javascripts/boards/components/board_blank_state.vue')
-rw-r--r--app/assets/javascripts/boards/components/board_blank_state.vue30
1 files changed, 15 insertions, 15 deletions
diff --git a/app/assets/javascripts/boards/components/board_blank_state.vue b/app/assets/javascripts/boards/components/board_blank_state.vue
index 9f26337d153..9a1da810ad0 100644
--- a/app/assets/javascripts/boards/components/board_blank_state.vue
+++ b/app/assets/javascripts/boards/components/board_blank_state.vue
@@ -29,25 +29,25 @@ export default {
});
});
+ const loadListIssues = listObj => {
+ const list = boardsStore.findList('title', listObj.title);
+
+ if (!list) {
+ return null;
+ }
+
+ list.id = listObj.id;
+ list.label.id = listObj.label.id;
+ return list.getIssues().catch(() => {
+ // TODO: handle request error
+ });
+ };
+
// Save the labels
boardsStore
.generateDefaultLists()
.then(res => res.data)
- .then(data => {
- data.forEach(listObj => {
- const list = boardsStore.findList('title', listObj.title);
-
- if (!list) {
- return;
- }
-
- list.id = listObj.id;
- list.label.id = listObj.label.id;
- list.getIssues().catch(() => {
- // TODO: handle request error
- });
- });
- })
+ .then(data => Promise.all(data.map(loadListIssues)))
.catch(() => {
boardsStore.removeList(undefined, 'label');
Cookies.remove('issue_board_welcome_hidden', {