Commit 79005021 authored by Clement Ho's avatar Clement Ho

Merge branch 'winh-eslint-promise/no-nesting-user_popovers.js' into 'master'

Remove nested Promise from user popover

See merge request gitlab-org/gitlab!17688
parents 61df1924 07c91cda
......@@ -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