Commit 07c91cda authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Clement Ho

Remove nested Promise from user popover

parent 61df1924
......@@ -63,7 +63,7 @@ const handleUserPopoverMouseOver = event => {
UsersCache.retrieveById(userId)
.then(userData => {
if (!userData) {
return;
return undefined;
}
Object.assign(user, {
......@@ -76,7 +76,8 @@ const handleUserPopoverMouseOver = event => {
loaded: true,
});
UsersCache.retrieveStatusById(userId)
return UsersCache.retrieveStatusById(userId);
})
.then(status => {
if (!status) {
return;
......@@ -86,10 +87,6 @@ const handleUserPopoverMouseOver = event => {
status,
});
})
.catch(() => {
throw new Error(`User status for "${userId}" could not be retrieved!`);
});
})
.catch(() => {
renderedPopover.$destroy();
renderedPopover = null;
......
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