fix(js): prevent old Edge from crashing
This commit is contained in:
parent
998105b11f
commit
4307445999
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ export function httpRequest(
|
||||||
controller?: AbortController;
|
controller?: AbortController;
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
const headers = new Headers(init.headers);
|
const headers = init.headers ? new Headers(init.headers) : new Headers();
|
||||||
if (csrf) {
|
if (csrf) {
|
||||||
headers.set('x-csrf-token', csrfToken() ?? '');
|
headers.set('x-csrf-token', csrfToken() ?? '');
|
||||||
headers.set('x-requested-with', 'XMLHttpRequest');
|
headers.set('x-requested-with', 'XMLHttpRequest');
|
||||||
|
|
Loading…
Reference in a new issue