Skip to content

Commit

Permalink
[ppr] Fix for error case involving prefetch data routes (#11638)
Browse files Browse the repository at this point in the history
Only error when the prefetch data route is present but the route also
has PPR enabled.
  • Loading branch information
wyattjoh committed May 23, 2024
1 parent 8e44ef5 commit 61e6af3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/sixty-lions-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@vercel/next': patch
'vercel': patch
---

Fix related to erroring when a prefetch route is not provided but the route is PPR enabled
2 changes: 1 addition & 1 deletion packages/next/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ export const onPrerenderRoute =
}

outputPathPrefetchData = normalizeDataRoute(prefetchDataRoute);
} else if (isAppPPREnabled) {
} else if (experimentalPPR) {
throw new Error('Invariant: expected to find prefetch data route PPR');
}

Expand Down

0 comments on commit 61e6af3

Please sign in to comment.