Skip to content

Commit 30d9753

Browse files
committed
Fixed CSRF token
1 parent 960a7df commit 30d9753

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/BaseService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export default abstract class BaseService {
4343
body: bodyInit
4444
});
4545

46-
this.state.csrfToken = response.headers.get(this.CSRF_TOKEN_HEADER);
46+
if (response.headers.has(this.CSRF_TOKEN_HEADER)) {
47+
this.state.csrfToken = response.headers.get(this.CSRF_TOKEN_HEADER);
48+
}
4749

4850
return response;
4951
}

0 commit comments

Comments
 (0)