From 9710d008f45aafa1c688ffb5e5331426dc1cdd59 Mon Sep 17 00:00:00 2001 From: James <33908344+allen-munsch@users.noreply.github.com> Date: Tue, 24 Sep 2019 09:20:51 -0500 Subject: [PATCH] Remove duplicate code --- graphene_django/static/graphene_django/graphiql.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/graphene_django/static/graphene_django/graphiql.js b/graphene_django/static/graphene_django/graphiql.js index 87775d4..a37bb83 100644 --- a/graphene_django/static/graphene_django/graphiql.js +++ b/graphene_django/static/graphene_django/graphiql.js @@ -51,13 +51,6 @@ Accept: 'application/json', 'Content-Type': 'application/json' }; - - 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]]; - return Object.assign(p, x); - }, {}); if (cookies.csrftoken && cookies.csrftoken.length) { headers['X-CSRFToken'] = cookies.csrftoken.pop(); }