Fix(nav): Only update user data if current challenge actually changes

This commit is contained in:
Berkeley Martinez
2016-08-04 15:18:51 -07:00
parent 879f5b3bb8
commit 91a50b4843

View File

@ -26,7 +26,8 @@ export function updateMyCurrentChallengeSaga(actions, getState) {
.filter(() => {
const { app: { user: username } } = getState();
return !!username;
});
})
.distinctUntilChanged();
const optimistic = updateChallenge$.map(id => {
const { app: { user: username } } = getState();
return updateMyCurrentChallenge(username, id);