mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-23 10:32:04 +03:00
add check for cookie
This commit is contained in:
parent
9710d008f4
commit
3139124132
|
@ -71,7 +71,7 @@
|
|||
try {
|
||||
return JSON.parse(responseBody);
|
||||
} catch (error) {
|
||||
if (cookies.csrftoken.length) {
|
||||
if (cookies.csrftoken && cookies.csrftoken.length) {
|
||||
headers['X-CSRFToken'] = cookies.csrftoken.pop();
|
||||
return getFetch(headers);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user