Revert "refactoring"
This reverts commit 4937976296b87af9aa75e089104c10da00b0bb4c.
This commit is contained in:
parent
4937976296
commit
b9d4092208
@ -111,7 +111,9 @@ export class DashboardStateDialogComponent extends
|
|||||||
return (c: UntypedFormControl) => {
|
return (c: UntypedFormControl) => {
|
||||||
const newStateId: string = c.value.toLowerCase();
|
const newStateId: string = c.value.toLowerCase();
|
||||||
if (newStateId) {
|
if (newStateId) {
|
||||||
const existing = this.states[newStateId];
|
const existing = Object.keys(this.states).some(
|
||||||
|
key => key.toLowerCase() === newStateId
|
||||||
|
);
|
||||||
if (existing && newStateId !== this.prevStateId.toLowerCase()) {
|
if (existing && newStateId !== this.prevStateId.toLowerCase()) {
|
||||||
return {
|
return {
|
||||||
stateExists: true
|
stateExists: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user