Skip to content

Commit e32bac7

Browse files
committed
chore(): remove method of() and added EMPTY constant
1 parent fc81584 commit e32bac7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/homepage/newsletter/services/newsletter.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HttpClient } from '@angular/common/http';
22
import { Injectable } from '@angular/core';
3-
import { of } from 'rxjs';
3+
import { EMPTY } from 'rxjs';
44
import { catchError } from 'rxjs/operators';
55

66
@Injectable({ providedIn: 'root' })
@@ -12,7 +12,7 @@ export class NewsletterService {
1212
'https://z93f42xq2l.execute-api.us-east-2.amazonaws.com/Stage/newsletter?token=db1f899025b5a59a76b6b34b2a013893';
1313
return this.httpClient
1414
.post(newsletterUrl, { email })
15-
.pipe(catchError(() => of()))
15+
.pipe(catchError(() => EMPTY ))
1616
.toPromise();
1717
}
1818
}

0 commit comments

Comments
 (0)