Merge pull request #10524 from BerkeleyTrue/fix/challenge-reducer-crash

Fix(challenge): Harden reducer against bad data fetch
This commit is contained in:
Quincy Larson
2016-09-09 00:16:14 -07:00
committed by GitHub

View File

@ -68,7 +68,7 @@ const mainReducer = handleActions(
...state, ...state,
challenge: payload challenge: payload
}), }),
[types.updateCurrentChallenge]: (state, { payload: challenge }) => ({ [types.updateCurrentChallenge]: (state, { payload: challenge = {} }) => ({
...state, ...state,
id: challenge.id, id: challenge.id,
// used mainly to find code storage // used mainly to find code storage