1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fixed error with the cookie parser in with-apollo-auth (#4445)

Fixes #4442
This commit is contained in:
Luis Fernando Alvarez D 2018-05-21 14:51:00 -05:00 committed by Tim Neutkens
parent 54e152b11b
commit 2ef80a354c

View file

@ -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
)
}