Commit a05af602 authored by Mark Harding's avatar Mark Harding

(fix): resolves logged out issues - closes #2100

1 merge request!590WIP: Epic/pro affiliate launch
Pipeline #89161204 running with stages
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Session } from '../../../../services/session';
@Component({
selector: 'm-analytics__channel',
templateUrl: 'channel.component.html',
})
export class ChannelAnalyticsComponent {}
export class ChannelAnalyticsComponent {
constructor(private router: Router, private session: Session) {}
ngOnInit() {
if (!this.session.isLoggedIn()) {
this.router.navigate(['/login']);
return;
}
}
}
......@@ -119,6 +119,6 @@ export class AnalyticsDashboardComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
this.paramsSubscription.unsubscribe();
if (this.paramsSubscription) this.paramsSubscription.unsubscribe();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment