Commit e318de62 authored by Brice BERNARD's avatar Brice BERNARD Committed by Tim Neutkens

[with-apollo-auth] Remove useless check from constructor (#4560)

We don't pass apolloClient as props, so I removed the check as confusing and always false.

see https://github.com/zeit/next.js/blob/canary/examples/with-apollo-auth/lib/withApollo.js#L72-L75

Again please explain me if I am wrong :)
parent 1a8bdba5
...@@ -79,11 +79,9 @@ export default App => { ...@@ -79,11 +79,9 @@ export default App => {
super(props) super(props)
// `getDataFromTree` renders the component first, the client is passed off as a property. // `getDataFromTree` renders the component first, the client is passed off as a property.
// After that rendering is done using Next's normal rendering pipeline // After that rendering is done using Next's normal rendering pipeline
this.apolloClient = this.apolloClient = initApollo(props.apolloState.data, {
props.apolloClient || getToken: () => parseCookies().token
initApollo(props.apolloState.data, { })
getToken: () => parseCookies().token
})
} }
render() { render() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment