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

[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 :)
This commit is contained in:
Brice BERNARD 2018-06-08 10:27:31 +02:00 committed by Tim Neutkens
parent 1a8bdba56b
commit e318de62c0

View file

@ -79,11 +79,9 @@ export default App => {
super(props)
// `getDataFromTree` renders the component first, the client is passed off as a property.
// After that rendering is done using Next's normal rendering pipeline
this.apolloClient =
props.apolloClient ||
initApollo(props.apolloState.data, {
getToken: () => parseCookies().token
})
this.apolloClient = initApollo(props.apolloState.data, {
getToken: () => parseCookies().token
})
}
render() {