From 2ef80a354c810eae63fb1c75330f4232a8aa8381 Mon Sep 17 00:00:00 2001 From: Luis Fernando Alvarez D Date: Mon, 21 May 2018 14:51:00 -0500 Subject: [PATCH] Fixed error with the cookie parser in with-apollo-auth (#4445) Fixes #4442 --- examples/with-apollo-auth/lib/withApollo.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/with-apollo-auth/lib/withApollo.js b/examples/with-apollo-auth/lib/withApollo.js index a5101566..6650cf63 100644 --- a/examples/with-apollo-auth/lib/withApollo.js +++ b/examples/with-apollo-auth/lib/withApollo.js @@ -8,9 +8,7 @@ import initApollo from './initApollo' function parseCookies(req, options = {}) { return cookie.parse( - req && req.headers.cookie - ? req.headers.cookie - : document.cookie, + req ? req.headers.cookie || '' : document.cookie, options ) }