forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix unnecessary missing slots warnings (vercel#74677)
This is meant to provide a warning when a `notFound` page is triggered by an unmatched parallel route, but was erroneously triggering for deliberate `notFound()` cases as well. This adjusts the warning to only occur when `missingSlots` has items in the set which will only be the case when a missing non-children slot triggers the `notFound()` Fixes vercel#74642
- Loading branch information
Showing
5 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/parallel-route-not-found/app/@bar/has-both-slots/not-found-error/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Page() { | ||
return <div>@bar slot</div> | ||
} |
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/parallel-route-not-found/app/@foo/has-both-slots/not-found-error/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Page() { | ||
return <div>@bar slot</div> | ||
} |
5 changes: 5 additions & 0 deletions
5
test/e2e/app-dir/parallel-route-not-found/app/has-both-slots/not-found-error/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { notFound } from 'next/navigation' | ||
|
||
export default function NotFoundError() { | ||
notFound() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters