No description
Find a file
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
.github Increase PR stats repo build timeout (#27419) 2021-07-22 19:16:48 +00:00
.vscode Remove bugfix needed for webpack 4 when webpack 5 is used (#23886) 2021-04-11 15:06:35 +00:00
bench Replace 'require' with 'import' in bench files and update dependancies (#25775) 2021-06-04 14:30:52 +00:00
docs Fixed minor grammar issue (#27493) 2021-07-26 04:19:37 +00:00
errors Fix typo in placeholder-blur-data-url error docs (#27510) 2021-07-26 17:04:47 +00:00
examples Fix CORS issue in GraphQL example that prevented Apollo Studio from working (#27486) 2021-07-25 21:47:04 +00:00
packages fix: Make router ready in case of custom _app getInitialProps (#27473) 2021-07-26 20:25:55 +00:00
scripts Update repo scripts to separate folder (#26787) 2021-07-01 13:41:27 +02:00
test fix: Make router ready in case of custom _app getInitialProps (#27473) 2021-07-26 20:25:55 +00:00
.alexignore Enable Alex documentation linting for docs (#26598) 2021-06-25 11:40:50 -05:00
.alexrc Enable Alex documentation linting for docs (#26598) 2021-06-25 11:40:50 -05:00
.eslintignore [ESLint] Remove error when file patterns are unmatched + ESLint setup changes (#27119) 2021-07-16 20:19:08 +02:00
.eslintrc.json [ESLint] Remove error when file patterns are unmatched + ESLint setup changes (#27119) 2021-07-16 20:19:08 +02:00
.gitignore Ignore emacs lockfiles (#20497) 2020-12-29 16:12:36 +00:00
.npmrc Remove version prefix 2018-10-02 01:35:56 +02:00
.prettierignore chore: Set Prettier to ignore test output (#26353) 2021-07-20 14:37:44 -05:00
.prettierignore_staged feat: webpack inlining with configuration for v4 / v5 (#20598) 2021-01-13 20:59:08 -05:00
.prettierrc.json Prettier trailingComma default value to es5 since 2.0 (#14391) 2020-06-22 13:25:24 +02:00
azure-pipelines.yml Update azure tests (#26779) 2021-06-30 17:03:43 -05:00
CODE_OF_CONDUCT.md Update Code of Conduct email address (#12108) 2020-04-22 16:27:24 +02:00
contributing.md Mention running local changes inside monorepo (#27050) 2021-07-09 11:39:00 -05:00
data.sqlite Fix export worker threads options (#25063) 2021-05-14 12:50:29 +02:00
jest.config.js Upgrade jest-worker (#23077) 2021-03-16 21:08:35 +00:00
lerna.json v11.0.2-canary.22 2021-07-26 12:48:27 -05:00
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
lint-staged.config.js Replace CLIEngine with ESLint (#25801) 2021-06-09 13:54:10 +02:00
package.json Use Sharp if available for Image Optimization (#27346) 2021-07-22 18:11:17 -05:00
readme.md Monorepo (#5341) 2018-10-01 01:02:10 +02:00
release.js Match last PR mention in commit message for release notes 2021-05-07 19:53:38 +02:00
run-tests.js Run acceptance tests non-concurrently (#25861) 2021-06-07 20:57:15 +02:00
SECURITY.md Create SECURITY.md 2020-07-13 19:25:08 +02:00
skip-docs-change.js Update repo scripts to separate folder (#26787) 2021-07-01 13:41:27 +02:00
test-file.txt Add additional file serving tests (#12479) 2020-05-04 11:58:19 -05:00
UPGRADING.md Move upgrading guide to /docs (#10727) 2020-02-28 23:46:18 +01:00
vercel.json Silence GH Comments for Preview URLs (#18766) 2020-11-03 21:59:47 +00:00
yarn.lock Use Sharp if available for Image Optimization (#27346) 2021-07-22 18:11:17 -05:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Authors