[ppr] Fix for error case involving prefetch data routes (#11638)

Only error when the prefetch data route is present but the route also
has PPR enabled.
This commit is contained in:
Wyatt Johnson
2024-05-23 02:28:05 -06:00
committed by GitHub
parent 8e44ef5b9d
commit 61e6af3740
2 changed files with 7 additions and 1 deletions

View File

@@ -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

View File

@@ -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');
}