Skip to content

Commit 378ede6

Browse files
author
Vikas Agarwal
committed
fix: git#840-Clicking Back button from Edit Challenge screen shows empty list of challenges
1 parent cc9eca0 commit 378ede6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/containers/ChallengeEditor/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ class ChallengeEditor extends Component {
106106
}
107107

108108
async fetchChallengeDetails (newMatch, loadChallengeDetails, loadResources) {
109-
const projectId = _.get(newMatch.params, 'projectId', null)
109+
let projectId = _.get(newMatch.params, 'projectId', null)
110+
projectId = projectId ? parseInt(projectId) : null
110111
const challengeId = _.get(newMatch.params, 'challengeId', null)
111112
await loadResources(challengeId)
112113
loadChallengeDetails(projectId, challengeId)

src/containers/Challenges/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class Challenges extends Component {
3535
if (menu === 'NULL' && activeProjectId !== -1) {
3636
resetSidebarActiveParams()
3737
} else {
38-
// this.props.loadChallengesByPage(1, projectId ? parseInt(projectId) : -1, CHALLENGE_STATUS.ACTIVE, '')
3938
if (projectId) {
4039
this.props.loadProject(projectId)
40+
this.reloadChallenges(this.props)
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)