From 4f54e408a504ec90ae576e331e92add7807426ef Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Thu, 11 May 2023 02:43:37 -0400 Subject: [PATCH] Removed erroneous error after registering admin --- src/app/app.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 58352e7..f7d551e 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -84,8 +84,8 @@ export class AppComponent implements OnInit, AfterViewInit { this.postsService.open_create_default_admin_dialog.subscribe(open => { if (open) { const dialogRef = this.dialog.open(SetDefaultAdminDialogComponent); - dialogRef.afterClosed().subscribe(success => { - if (success) { + dialogRef.afterClosed().subscribe(res => { + if (!res || !res['user']) { if (this.router.url !== '/login') { this.router.navigate(['/login']); } } else { console.error('Failed to create default admin account. See logs for details.');