Commit a5eea410 authored by Winnie Hellmann's avatar Winnie Hellmann

Remove nested Promise from board blank state

parent bc6dbdcb
......@@ -29,25 +29,25 @@ export default {
});
});
// Save the labels
boardsStore
.generateDefaultLists()
.then(res => res.data)
.then(data => {
data.forEach(listObj => {
const loadListIssues = listObj => {
const list = boardsStore.findList('title', listObj.title);
if (!list) {
return;
return null;
}
list.id = listObj.id;
list.label.id = listObj.label.id;
list.getIssues().catch(() => {
return list.getIssues().catch(() => {
// TODO: handle request error
});
});
})
};
// Save the labels
boardsStore
.generateDefaultLists()
.then(res => res.data)
.then(data => Promise.all(data.map(loadListIssues)))
.catch(() => {
boardsStore.removeList(undefined, 'label');
Cookies.remove('issue_board_welcome_hidden', {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment