Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
6cbe40fb
Unverified
Commit
6cbe40fb
authored
Jun 04, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Jun 04, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev-overlay] Remove unnecessary code from /pages dev error boundary (#79983)
No longer needed in React 18+
parent
002fb28e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
7 deletions
+1
-7
pages-dev-overlay-error-boundary.tsx
...ct-dev-overlay/pages/pages-dev-overlay-error-boundary.tsx
+0
-4
pages-dev-overlay.tsx
.../components/react-dev-overlay/pages/pages-dev-overlay.tsx
+1
-3
No files found.
packages/next/src/client/components/react-dev-overlay/pages/pages-dev-overlay-error-boundary.tsx
View file @
6cbe40fb
...
@@ -15,10 +15,6 @@ export class PagesDevOverlayErrorBoundary extends React.PureComponent<
...
@@ -15,10 +15,6 @@ export class PagesDevOverlayErrorBoundary extends React.PureComponent<
return
{
error
}
return
{
error
}
}
}
componentDidCatch
(
error
:
Error
)
{
this
.
setState
({
error
})
}
// Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.
// Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.
render
():
React
.
ReactNode
{
render
():
React
.
ReactNode
{
// The component has to be unmounted or else it would continue to error
// The component has to be unmounted or else it would continue to error
...
...
packages/next/src/client/components/react-dev-overlay/pages/pages-dev-overlay.tsx
View file @
6cbe40fb
...
@@ -17,9 +17,7 @@ export function PagesDevOverlay({ children }: PagesDevOverlayProps) {
...
@@ -17,9 +17,7 @@ export function PagesDevOverlay({ children }: PagesDevOverlayProps) {
return
(
return
(
<>
<>
<
PagesDevOverlayErrorBoundary
>
<
PagesDevOverlayErrorBoundary
>
{
children
}
</
PagesDevOverlayErrorBoundary
>
{
children
??
null
}
</
PagesDevOverlayErrorBoundary
>
{
/* Fonts can only be loaded outside the Shadow DOM. */
}
{
/* Fonts can only be loaded outside the Shadow DOM. */
}
<
FontStyles
/>
<
FontStyles
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment