Browse Source

Revert "refactoring"

This reverts commit 4937976296.
pull/12004/head
mpetrov 2 years ago
parent
commit
b9d4092208
  1. 4
      ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts

4
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

Loading…
Cancel
Save