diff --git a/src/withApollo.tsx b/src/withApollo.tsx index 6e273b1..f7a659d 100644 --- a/src/withApollo.tsx +++ b/src/withApollo.tsx @@ -33,12 +33,8 @@ export default function withApollo( const render = pageOptions.render || options.render; const onError = pageOptions.onError || options.onError; - function WithApollo({ - apollo, - apolloState, - router, - ...props - }: ApolloProps) { + function WithApollo({ apollo, apolloState, ...props }: ApolloProps) { + const router = props.router; const apolloClient = apollo || initApollo(client, {