Skip to content

Commit c131a23

Browse files
committed
Extra fixes related to the recent commits
1 parent 787dad8 commit c131a23

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/shared/components/challenge-detail/Header/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default function ChallengeHeader(props) {
9595
* iterate through all their submissions and ensure that all of them
9696
* are Deleted
9797
*/
98-
const hasSubmissions = userDetails && userDetails.submissions.reduce(
98+
const hasSubmissions = userDetails && (userDetails.submissions || []).reduce(
9999
(acc, submission) => acc || submission.status !== 'Deleted', false);
100100

101101
const nextPhase =

src/shared/reducers/challenge.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ function onGetDetailsInit(state, action) {
4949
function onGetDetailsDone(state, action) {
5050
if (action.error) {
5151
logger.error('Failed to get challenge details!', action.payload);
52+
fireErrorMessage('ERROR: Failed to load the challenge',
53+
'Please, try again a bit later');
5254
return {
5355
...state,
5456
fetchChallengeFailure: action.error,

0 commit comments

Comments
 (0)