diff --git a/Frontend/src/app/components/auth/registration/registration.component.ts b/Frontend/src/app/components/auth/registration/registration.component.ts
index a624666..5324f72 100644
--- a/Frontend/src/app/components/auth/registration/registration.component.ts
+++ b/Frontend/src/app/components/auth/registration/registration.component.ts
@@ -36,8 +36,8 @@ export class RegistrationComponent implements OnInit {
onSubmit() {
this.api.registerUser(this.form.value.username, this.form.value.password, this.form.value.email).subscribe(
res=> {
- this.router.navigate(['']);
this.api.saveSessionInfoToLocalStorage(res);
+ this.router.navigate(['/']);
}
);
}
diff --git a/Frontend/src/app/components/profile/profile.component.ts b/Frontend/src/app/components/profile/profile.component.ts
index 611e06a..5620827 100644
--- a/Frontend/src/app/components/profile/profile.component.ts
+++ b/Frontend/src/app/components/profile/profile.component.ts
@@ -11,7 +11,7 @@ export class ProfileComponent implements OnInit {
currentUser: any;
obj:any;
alarms: any [];
- productsMap: any;
+ productsMap: any = {};
constructor(private api: ApiService ) { }
@@ -37,7 +37,7 @@ export class ProfileComponent implements OnInit {
}
getProductsByIds(): void {
- let productIds: number [];
+ let productIds: number [] = [];
this.alarms.forEach(
alarm => {productIds.push(alarm.product_id)}
);
diff --git a/Frontend/src/app/components/top-bar/top-bar.component.html b/Frontend/src/app/components/top-bar/top-bar.component.html
index 944d654..2e3ebd8 100644
--- a/Frontend/src/app/components/top-bar/top-bar.component.html
+++ b/Frontend/src/app/components/top-bar/top-bar.component.html
@@ -2,7 +2,7 @@
Betterzon