-
Notifications
You must be signed in to change notification settings - Fork 26k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix unhandled runtime error when notFound() triggered in generateMeta…
…data w/ parallel routes
- Loading branch information
Showing
5 changed files
with
36 additions
and
1 deletion.
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/not-found-metadata/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</div> | ||
} |
9 changes: 9 additions & 0 deletions
9
test/e2e/app-dir/parallel-route-not-found/app/@foo/not-found-metadata/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,9 @@ | ||
export function generateMetadata() { | ||
return { | ||
title: 'Create Next App', | ||
} | ||
} | ||
|
||
export default function Page() { | ||
return <div>@foo</div> | ||
} |
12 changes: 12 additions & 0 deletions
12
test/e2e/app-dir/parallel-route-not-found/app/not-found-metadata/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,12 @@ | ||
import { notFound } from 'next/navigation' | ||
|
||
export function generateMetadata() { | ||
notFound() | ||
return { | ||
title: 'Create Next App', | ||
} | ||
} | ||
|
||
export default function Page() { | ||
return <h1>Hello from Page</h1> | ||
} |
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