Skip to content

Commit 9948804

Browse files
fix: Remove CFS transition from fastboot (#4856)
1 parent f77aa00 commit 9948804

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/routes/public/cfs/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import classic from 'ember-classic-decorator';
22
import Route from '@ember/routing/route';
3+
import { inject as service } from '@ember/service';
34

45
@classic
56
export default class IndexRoute extends Route {
7+
@service
8+
fastboot;
9+
610
titleToken() {
711
return this.l10n.t('Call for Speakers');
812
}
913

1014
async beforeModel(transition) {
15+
// We don't want to process or transition in fastboot mode
16+
// Since this is only an intermediate page
17+
if (this.fastboot.isFastBoot) {return}
1118
const hash = transition.to.params['public.cfs'] ? transition.to.params['public.cfs'].speaker_call_hash : null;
1219
const eventDetails = this.modelFor('public');
1320
const speakersCall = await eventDetails.get('speakersCall');
@@ -21,6 +28,7 @@ export default class IndexRoute extends Route {
2128
if (!speakersCall.announcement) {
2229
this.notify.error(this.l10n.t('Call For Speakers has not been issued yet.'));
2330
this.transitionTo('public', eventDetails.identifier);
31+
return;
2432
}
2533
if (!((speakersCall.privacy === 'public' && (!hash || speakersCall.hash === hash)) || (speakersCall.privacy === 'private' && hash === speakersCall.hash))) {
2634
this.transitionTo('not-found');

0 commit comments

Comments
 (0)