From 106290a11edf3c2000b45ad4c50547c23bd6e96e Mon Sep 17 00:00:00 2001 From: Vamsi Jada Date: Sat, 16 Nov 2019 22:44:10 +0530 Subject: [PATCH] Changes for fixing issue 11420 (#11521) --- .../client/src/components/challenges/challengeDetail.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/client/src/components/challenges/challengeDetail.vue b/website/client/src/components/challenges/challengeDetail.vue index 2b07ca53b6..de0962c386 100644 --- a/website/client/src/components/challenges/challengeDetail.vue +++ b/website/client/src/components/challenges/challengeDetail.vue @@ -417,7 +417,12 @@ export default { return cleansedTask; }, async loadChallenge () { - this.challenge = await this.$store.dispatch('challenges:getChallenge', { challengeId: this.searchId }); + try { + this.challenge = await this.$store.dispatch('challenges:getChallenge', { challengeId: this.searchId }); + } catch (e) { + this.$router.push('/challenges/findChallenges'); + return; + } this.members = await this .loadMembers({ challengeId: this.searchId, includeAllPublicFields: true }); const tasks = await this.$store.dispatch('tasks:getChallengeTasks', { challengeId: this.searchId });