Issue
Whenever I am wrapping my page lets say pages_/login.tsx with a Context and Provider, I get this error.
```> Build error occurred
TypeError: Cannot read property 'getInitialProps' of undefined
So the question is, how can I still be able to use my custom context and wrap my pages with without getting this error on `yarn build`
The error is located in here
if(C.getInitialProps) {
Page.getInitialProps = ctx => C.getInitialProps({ ...ctx, lang: 'de'})
}
But if I add
if(C && C.getInitialProps)
....
```
the issue gets fixed, but this is not a since pages are dynamically created.
Ok, this should be fixed! Thanks to report it!
@OmarZeidan this will be solved on 0.15.0. Feel free to reopen if it still happening.
@aralroca Great to hearing that. Thanks and will def do.