3 ms·
You're still nesting. Considering the whole point the author made was that something went wrong with `filterUsersWithFriends`, then you would simply handle that
by eyko 10y ago
You're still nesting. Considering the whole point the author made was that something went wrong with `filterUsersWithFriends`, then you would simply handle that in the next `.then`... So something like:
export default function getUsers () {
return getUsers()
.then(users => filterUsersWithFriends)
.then(getUsersLikes, trySomethingElse);
}
would have been more than enough.
- md224 10y agoI think the problem with your solution is that trySomethingElse won't have access to the users variable unless the filterUsersWithFriends rejection explicitly passes it through.