diff --git a/src/app/degree-planner/degree-planner.component.ts b/src/app/degree-planner/degree-planner.component.ts index b87a2095ac3cc8fbdc7cbb4e4fd72aa1f9d84aa8..743164376258db0c67d5eba92f0a1062e2b13a2f 100644 --- a/src/app/degree-planner/degree-planner.component.ts +++ b/src/app/degree-planner/degree-planner.component.ts @@ -87,6 +87,12 @@ export class DegreePlannerComponent implements OnInit, OnDestroy { map(years => Object.keys(years)), distinctUntilChanged(utils.compareStringArrays), ); + + this.activeTermSubscription = this.store + .pipe(select(selectors.getActiveTerms)) + .subscribe(terms => { + this.firstActiveTerm = terms[0]; + }); } // Unsubscribe from subs to prevent memeory leaks @@ -148,12 +154,6 @@ export class DegreePlannerComponent implements OnInit, OnDestroy { } public onMakePrimayClick(currentPlan: DegreePlan) { - this.activeTermSubscription = this.store - .pipe(select(selectors.getActiveTerms)) - .subscribe(terms => { - this.firstActiveTerm = terms[0]; - }); - const currentTerm: any = new GetTermDescriptionPipe().transform( this.firstActiveTerm, );