diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts index c9224c1da0..0a4abccf61 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts @@ -111,7 +111,9 @@ export class DashboardStateDialogComponent extends return (c: UntypedFormControl) => { const newStateId: string = c.value.toLowerCase(); if (newStateId) { - const existing = this.states[newStateId]; + const existing = Object.keys(this.states).some( + key => key.toLowerCase() === newStateId + ); if (existing && newStateId !== this.prevStateId.toLowerCase()) { return { stateExists: true