fix(client): update current challenge for all challenges

This commit is contained in:
Valeriy S
2019-02-06 14:30:54 +03:00
committed by Stuart Taylor
parent ba9e45023d
commit f6fa754906
7 changed files with 81 additions and 53 deletions

View File

@@ -89,6 +89,10 @@ function saveCodeEpic(action$, state$) {
function loadCodeEpic(action$, state$) {
return action$.pipe(
ofType(types.challengeMounted),
filter(() => {
const files = challengeFilesSelector(state$.value);
return Object.keys(files).length > 0;
}),
switchMap(({ payload: id }) => {
let finalFiles;
const state = state$.value;