diff --git a/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts b/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts index a81d80e756760a150c33ef720a9ca732f716b17c..a018d52316ab4162f9306f44a48f0228590e0776 100644 --- a/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts +++ b/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts @@ -3,7 +3,7 @@ import { TranslateService } from '@ngx-translate/core'; import { NotificationService } from '@service/notification/notification.service'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; -import { tap, exhaustMap, finalize, catchError } from 'rxjs/operators'; +import { tap, exhaustMap, finalize, catchError, filter } from 'rxjs/operators'; import { of } from 'rxjs'; import { FunctionsService } from '@service/functions.service'; import { NoteEditorComponent } from '@appRoot/notes/note-editor.component'; @@ -43,7 +43,7 @@ export class CloseMailActionComponent implements OnInit { checkIndexingClose() { this.http.get(`../rest/actions/${this.data.action.id}`).pipe( tap((data: any) => { - this.requiredFields = data.action.parameters.requiredFields; + this.requiredFields = !this.functions.empty(data.action.parameters.requiredFields) ? data.action.parameters.requiredFields : []; }), exhaustMap(() => this.http.get(`../rest/customFields`)), tap((data: any) => this.customFields = data.customFields),