-
Notifications
You must be signed in to change notification settings - Fork 26.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font optimization can result in error: "TypeError: Cannot read property 'type' of null" #32024
Comments
Im prepping a fix for this issue. |
Curious why you titled this as a Font optimization error? |
The error is occurring in a function called If this needs retitled I can make that change. |
Fixes #32024 Fixing makeStylesheetInert. Fixes log import. ## Bug - [x] Related issues linked using `fixes #number` - [ ] 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 - [ ] Make sure the linting passes by running `yarn lint` Co-authored-by: Devin Wall <87490815+DevinWallKcl@users.noreply.github.com>
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Fixes vercel#32024 Fixing makeStylesheetInert. Fixes log import. ## Bug - [x] Related issues linked using `fixes #number` - [ ] 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 - [ ] Make sure the linting passes by running `yarn lint` Co-authored-by: Devin Wall <87490815+DevinWallKcl@users.noreply.github.com>
What version of Next.js are you using?
12.0.4
What version of Node.js are you using?
12.22.3
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
next start
Describe the Bug
When a child element or fragment of the
Head
component contains a falsely value in its children then the following build/runtime error will surface,"TypeError: Cannot read property 'type' of null"
. This error can surface at runtime or at build time depending on the build method being used. The SWC build system will surface the error at build time while the legacy build methodology will result in a runtime error.Expected Behavior
Falsey child elements of elements contained within the
Head
component should not result in a build/runtime error.To Reproduce
_document.js
.yarn build
.*Note: If you are using SWC the error will surface on step here.
yarn start
.Please see the following repo for reproduction.
The text was updated successfully, but these errors were encountered: