diff --git a/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts b/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts index b1b75737c9b0fe74f343306e9ae45b97cf730313..6f325f13b88da86dd501c8e67692cb77ae02567b 100644 --- a/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts +++ b/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts @@ -63,11 +63,10 @@ export class SendShippingActionComponent implements OnInit { this.http.put('../../rest/resourcesList/users/' + this.data.currentBasketInfo.ownerId + '/groups/' + this.data.currentBasketInfo.groupId + '/baskets/' + this.data.currentBasketInfo.basketId + '/actions/' + this.data.action.id, { resources: realResSelected, data: { shippingTemplateId: this.currentShipping.id }, note: this.noteEditor.getNoteContent() }) .subscribe((data: any) => { - if (data && data.data != null) { - this.dialogRef.close('success'); - } if (data && data.errors != null) { this.notify.error(data.errors); + } else { + this.dialogRef.close('success'); } this.loading = false; }, (err: any) => {