rsnext/packages/next/shared/lib
Sojin Park 23ac4351f4
fix: Make router ready in case of custom _app getInitialProps (#27473)
From https://github.com/vercel/next.js/pull/20628,  when the page is rendered server-side, `Router`'s `isReady` field needs to be initially set to `true`. However, when `_app` has custom `getInitialProps`, it seems that it is not the case, even though the page is rendered on the server. 

This leads to a bug that `Router.isReady` is never set to `true`.

This pull request fixes the problem by fixing the initial calculation logic of `isReady` of `Router`.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-26 20:25:55 +00:00
..
i18n Refactor i18n checks on request handling (#27328) 2021-07-21 16:12:33 +00:00
router fix: Make router ready in case of custom _app getInitialProps (#27473) 2021-07-26 20:25:55 +00:00
amp-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.ts Leverage blocked page for _error (#26748) 2021-07-01 00:08:36 +00:00
document-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
dynamic.tsx Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
head-manager-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
head.tsx Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
loadable-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
loadable.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
loadable.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
mitt.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
post-process.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
router-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
runtime-config.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
side-effect.tsx Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
to-base-64.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
utils.ts Refactor i18n checks on request handling (#27328) 2021-07-21 16:12:33 +00:00