Skip to content

Commit d972502

Browse files
Copilotrenemadsen
andcommitted
Fix additional catchError operators in working-hours-header component
Co-authored-by: renemadsen <[email protected]>
1 parent 266fac8 commit d972502

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

eform-client/src/app/plugins/modules/time-planning-pn/modules/working-hours/components/working-hours-header/working-hours-header.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {TimePlanningsReportAllWorkersDownloadRequestModel} from '../../../../mod
66
import {saveAs} from 'file-saver';
77
import {ToastrService} from 'ngx-toastr';
88
import {TimePlanningPnWorkingHoursService} from '../../../../services';
9-
import {Subscription} from 'rxjs';
9+
import {EMPTY, Subscription} from 'rxjs';
1010
import {MatIconRegistry} from '@angular/material/icon';
1111
import {DomSanitizer} from '@angular/platform-browser';
1212
import {catchError} from 'rxjs/operators';
@@ -75,9 +75,9 @@ export class WorkingHoursHeaderComponent implements OnInit {
7575
this.downloadReportSub$ = this.workingHoursService
7676
.downloadReport(model)
7777
.pipe(catchError(
78-
(error, caught) => {
78+
(error) => {
7979
this.toastrService.error('Error downloading report');
80-
return caught;
80+
return EMPTY;
8181
}))
8282
.subscribe(
8383
(data) => {
@@ -113,9 +113,9 @@ export class WorkingHoursHeaderComponent implements OnInit {
113113
this.downloadReportSub$ = this.workingHoursService
114114
.downloadReportAllWorkers(model)
115115
.pipe(catchError(
116-
(caught) => {
116+
(error) => {
117117
this.toastrService.error('Error downloading report');
118-
return caught;
118+
return EMPTY;
119119
}))
120120
.subscribe(
121121
(data) => {

0 commit comments

Comments
 (0)