Skip to content

Commit

Permalink
fix: Recursively look for route params for private CFS (fossasia#5411)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal authored and sansyrox committed Nov 9, 2020
1 parent 6d3d17f commit 0993bec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/routes/public/cfs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ export default class IndexRoute extends Route {
return this.l10n.t('Call for Speakers');
}

getHash(routeInfo) {
if (!routeInfo) {return null}
const hash = (routeInfo.params['public.cfs'] || routeInfo.params)?.speaker_call_hash;
if (hash) {return hash}
return this.getHash(routeInfo.parent);
}

async beforeModel(transition) {
// We don't want to process or transition in fastboot mode
// Since this is only an intermediate page
if (this.fastboot.isFastBoot) {return}
const hash = transition.to.params['public.cfs'] ? transition.to.params['public.cfs'].speaker_call_hash : null;
const hash = this.getHash(transition.to);
const eventDetails = this.modelFor('public');
const speakersCall = await eventDetails.get('speakersCall');
/*
Expand Down

0 comments on commit 0993bec

Please sign in to comment.