@@ -69,6 +69,8 @@ export class ResultSelectionStore {
6969 } ;
7070
7171 constructor ( private resultSelectionService : ResultSelectionService , route : ActivatedRoute , private router : Router ) {
72+ this . _resultSelectionCommand$ = new BehaviorSubject < ResultSelectionCommand > ( { } ) ;
73+ this . _remainingResultSelection$ = new BehaviorSubject < RemainingResultSelection > ( { } ) ;
7274 route . queryParams . subscribe ( ( params : Params ) => {
7375 if ( params ) {
7476 params = this . renameParamKeys ( this . oldToNewChartKeyMap , params ) ;
@@ -95,8 +97,8 @@ export class ResultSelectionStore {
9597 ...( params . performanceAspectTypes && { performanceAspectTypes : [ ] . concat ( params . performanceAspectTypes ) } )
9698 } ;
9799
98- this . _resultSelectionCommand$ = new BehaviorSubject < ResultSelectionCommand > ( resultSelectionCommand ) ;
99- this . _remainingResultSelection$ = new BehaviorSubject ( remainingResultSelection ) ;
100+ this . _resultSelectionCommand$ . next ( resultSelectionCommand ) ;
101+ this . _remainingResultSelection$ . next ( remainingResultSelection ) ;
100102 }
101103 } ) ;
102104
@@ -105,12 +107,12 @@ export class ResultSelectionStore {
105107 let defaultTo = new Date ( ) ;
106108 defaultFrom . setDate ( defaultTo . getDate ( ) - 3 ) ;
107109
108- this . _resultSelectionCommand$ = new BehaviorSubject ( {
110+ const resultSelectionCommand : ResultSelectionCommand = {
109111 from : defaultFrom ,
110112 to : defaultTo ,
111113 caller : Caller . EventResult
112- } ) ;
113- this . _remainingResultSelection$ = new BehaviorSubject ( { } ) ;
114+ } ;
115+ this . _resultSelectionCommand$ . next ( resultSelectionCommand ) ;
114116 }
115117 }
116118
0 commit comments