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