File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
import classic from 'ember-classic-decorator' ;
2
2
import Route from '@ember/routing/route' ;
3
+ import { inject as service } from '@ember/service' ;
3
4
4
5
@classic
5
6
export default class IndexRoute extends Route {
7
+ @service
8
+ fastboot ;
9
+
6
10
titleToken ( ) {
7
11
return this . l10n . t ( 'Call for Speakers' ) ;
8
12
}
9
13
10
14
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 }
11
18
const hash = transition . to . params [ 'public.cfs' ] ? transition . to . params [ 'public.cfs' ] . speaker_call_hash : null ;
12
19
const eventDetails = this . modelFor ( 'public' ) ;
13
20
const speakersCall = await eventDetails . get ( 'speakersCall' ) ;
@@ -21,6 +28,7 @@ export default class IndexRoute extends Route {
21
28
if ( ! speakersCall . announcement ) {
22
29
this . notify . error ( this . l10n . t ( 'Call For Speakers has not been issued yet.' ) ) ;
23
30
this . transitionTo ( 'public' , eventDetails . identifier ) ;
31
+ return ;
24
32
}
25
33
if ( ! ( ( speakersCall . privacy === 'public' && ( ! hash || speakersCall . hash === hash ) ) || ( speakersCall . privacy === 'private' && hash === speakersCall . hash ) ) ) {
26
34
this . transitionTo ( 'not-found' ) ;
You can’t perform that action at this time.
0 commit comments