From e33523e9921b410963715684798b15ee8298edf9 Mon Sep 17 00:00:00 2001 From: James <33908344+allen-munsch@users.noreply.github.com> Date: Tue, 24 Sep 2019 09:18:35 -0500 Subject: [PATCH] Use var instead of let, add var for value --- graphene_django/static/graphene_django/graphiql.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/graphene_django/static/graphene_django/graphiql.js b/graphene_django/static/graphene_django/graphiql.js index 6f4a95a..87775d4 100644 --- a/graphene_django/static/graphene_django/graphiql.js +++ b/graphene_django/static/graphene_django/graphiql.js @@ -2,9 +2,10 @@ // Parse the cookie value for a CSRF token var csrftoken; var cookies = document.cookie.split(';').reduce((p, c) => { - let x = {}; - let key = c.split('=')[0].trim(); - x[key] = p[key] ? p[key].concat([c.split('=')[1]]) : [c.split('=')[1]]; + var x = {}; + var key = c.split('=')[0].trim(); + var value = c.split('=')[1] + x[key] = p[key] ? p[key].concat([value]) : [value]; return Object.assign(p, x); }, {}); // Collect the URL parameters