From 187b18d5c01f6a13831e4a410b5d7c349e27d847 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 21 Nov 2022 08:23:05 +0000 Subject: [PATCH] fix(plex): :bug: Fixed the issue where you couldn't add a new server on a fresh setup after the settings page rework --- .../plex-server-dialog/plex-server-dialog.component.ts | 1 - src/Ombi/ClientApp/src/app/settings/plex/plex.component.ts | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Ombi/ClientApp/src/app/settings/plex/components/plex-server-dialog/plex-server-dialog.component.ts b/src/Ombi/ClientApp/src/app/settings/plex/components/plex-server-dialog/plex-server-dialog.component.ts index 851b5d287..e83a90e61 100644 --- a/src/Ombi/ClientApp/src/app/settings/plex/components/plex-server-dialog/plex-server-dialog.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/plex/components/plex-server-dialog/plex-server-dialog.component.ts @@ -17,7 +17,6 @@ import { PlexServerDialogData } from "../models"; }) export class PlexServerDialogComponent { - public password: string; public username: string; diff --git a/src/Ombi/ClientApp/src/app/settings/plex/plex.component.ts b/src/Ombi/ClientApp/src/app/settings/plex/plex.component.ts index cad3a05bd..414faf56f 100644 --- a/src/Ombi/ClientApp/src/app/settings/plex/plex.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/plex/plex.component.ts @@ -36,6 +36,10 @@ export class PlexComponent implements OnInit, OnDestroy { public ngOnInit() { this.settingsService.getPlex().subscribe(x => { this.settings = x; + + if (!this.settings.servers) { + this.settings.servers = []; + } }); } @@ -154,6 +158,9 @@ export class PlexComponent implements OnInit, OnDestroy { panelClass: "modal-panel", }); dialog.afterClosed().subscribe((x) => { + if (x.closed) { + return; + } if (x.server) { this.settings.servers.push(x.server); }