We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c19c241 commit 21fcb10Copy full SHA for 21fcb10
projects/angular-token/src/lib/angular-token.interceptor.ts
@@ -44,8 +44,10 @@ export class AngularTokenInterceptor implements HttpInterceptor {
44
45
// Parse Auth data from response
46
private handleResponse(res: any): void {
47
- if ((res instanceof HttpResponse || res instanceof HttpErrorResponse) && (this.tokenService.apiBase === null || res.url.match(this.tokenService.apiBase))) {
+ if (res instanceof HttpResponse || res instanceof HttpErrorResponse) {
48
+ if (this.tokenService.apiBase === null || (res.url && res.url.match(this.tokenService.apiBase))) {
49
this.tokenService.getAuthHeadersFromResponse(<any>res);
50
+ }
51
}
52
53
0 commit comments