Browse Source

bugfix: validate platform field if value is set

pull/2429/head
Kevin Lien 2 years ago
committed by Thomas
parent
commit
409dd5d455
  1. 4
      apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts

4
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts

@ -115,7 +115,7 @@ export class CreateOrUpdateAccountDialog implements OnDestroy {
}
public displayFn(platform: Platform) {
return platform?.name ? platform.name : '';
return platform?.name ?? '';
}
private _filter(value: string): Platform[] {
@ -127,7 +127,7 @@ export class CreateOrUpdateAccountDialog implements OnDestroy {
private _autocompleteObjectValidator(): ValidatorFn {
return (control: AbstractControl) => {
if (typeof control.value === 'string') {
if (control.value && typeof control.value === 'string') {
return { invalidAutocompleteObject: { value: control.value } };
}
return null;

Loading…
Cancel
Save