diff --git a/common/app/routes/challenges/redux/reset-challenge-saga.js b/common/app/routes/challenges/redux/reset-challenge-saga.js index 1ee4b2b9b8..65ff5ec5ad 100644 --- a/common/app/routes/challenges/redux/reset-challenge-saga.js +++ b/common/app/routes/challenges/redux/reset-challenge-saga.js @@ -1,15 +1,22 @@ +import { Observable } from 'rx'; import types from './types'; -import { updateCurrentChallenge } from './actions'; +import { + updateCurrentChallenge, + updateMain +} from './actions'; export default function resetChallengeSaga(actions$, getState) { return actions$ .filter(({ type }) => type === types.resetChallenge) - .map(() => { + .flatMap(() => { const { challengesApp: { challenge: dashedName }, entities: { challenge: challengeMap } } = getState(); const currentChallenge = challengeMap[dashedName]; - return updateCurrentChallenge(currentChallenge); + return Observable.of( + updateCurrentChallenge(currentChallenge), + updateMain() + ); }); }