mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-06-30 10:23:12 +03:00
Use var instead of let, add var for value
This commit is contained in:
parent
6c8d4a386b
commit
e33523e992
|
@ -2,9 +2,10 @@
|
||||||
// Parse the cookie value for a CSRF token
|
// Parse the cookie value for a CSRF token
|
||||||
var csrftoken;
|
var csrftoken;
|
||||||
var cookies = document.cookie.split(';').reduce((p, c) => {
|
var cookies = document.cookie.split(';').reduce((p, c) => {
|
||||||
let x = {};
|
var x = {};
|
||||||
let key = c.split('=')[0].trim();
|
var key = c.split('=')[0].trim();
|
||||||
x[key] = p[key] ? p[key].concat([c.split('=')[1]]) : [c.split('=')[1]];
|
var value = c.split('=')[1]
|
||||||
|
x[key] = p[key] ? p[key].concat([value]) : [value];
|
||||||
return Object.assign(p, x);
|
return Object.assign(p, x);
|
||||||
}, {});
|
}, {});
|
||||||
// Collect the URL parameters
|
// Collect the URL parameters
|
||||||
|
|
Loading…
Reference in New Issue
Block a user