fix(client): get backend challenge data on challenge mount

This commit is contained in:
Valeriy
2019-02-18 00:07:01 +03:00
committed by Stuart Taylor
parent 34503c86d8
commit 71cf4495cb

View File

@ -171,7 +171,7 @@ export const isResetModalOpenSelector = state => state[ns].modal.reset;
export const isBuildEnabledSelector = state => state[ns].isBuildEnabled;
export const successMessageSelector = state => state[ns].successMessage;
export const backendFormValuesSelector = state => state.form[backendNS];
export const backendFormValuesSelector = state => state.form[backendNS] || {};
export const projectFormValuesSelector = state =>
state[ns].projectFormValues || {};
@ -187,9 +187,7 @@ export const challengeDataSelector = state => {
files: challengeFilesSelector(state)
};
} else if (challengeType === challengeTypes.backend) {
const {
solution: { value: url }
} = backendFormValuesSelector(state);
const { solution: { value: url } = {} } = backendFormValuesSelector(state);
challengeData = {
...challengeData,
url