diff --git a/web/src/admin/applications/wizard/steps/providers/ApplicationWizardProviderForm.ts b/web/src/admin/applications/wizard/steps/providers/ApplicationWizardProviderForm.ts index 0a08773ed4..350029f21b 100644 --- a/web/src/admin/applications/wizard/steps/providers/ApplicationWizardProviderForm.ts +++ b/web/src/admin/applications/wizard/steps/providers/ApplicationWizardProviderForm.ts @@ -25,7 +25,7 @@ export class ApplicationWizardProviderForm extends AKEl wizard!: ApplicationWizardState; @property({ type: Object, attribute: false }) - errors: Map = new Map(); + errors: Record = {}; @query("form#providerform") form!: HTMLFormElement; @@ -41,13 +41,13 @@ export class ApplicationWizardProviderForm extends AKEl } get valid() { - this.errors = new Map(); + this.errors = {}; return this.form.checkValidity(); } errorMessages(name: string) { - return this.errors.has(name) - ? [this.errors.get(name)] + return name in this.errors + ? [this.errors[name]] : (this.wizard.errors?.provider?.[name] ?? this.wizard.errors?.provider?.[camelToSnake(name)] ?? []); @@ -56,7 +56,7 @@ export class ApplicationWizardProviderForm extends AKEl isValid(name: keyof T) { return !( (this.wizard.errors?.provider?.[name as string] ?? []).length > 0 || - this.errors.has(name) + this.errors?.[name] !== undefined ); } }