fix: invalid token are sent

This commit is contained in:
mutoe 2020-10-20 21:06:40 +08:00
parent c5e8081c31
commit 82b1b97cc6
No known key found for this signature in database
GPG Key ID: ABE5E78D073FC208
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ export default class FetchRequest {
public setAuthorizationHeader (token: string): void {
if (!this.options.headers) this.options.headers = {}
this.options.headers.Authorization = `Token ${token}`
if (token) this.options.headers.Authorization = `Token ${token}`
}
public deleteAuthorizationHeader (): void {