Skip to content

Commit

Permalink
Fix prerendered dynamic ISR functions with catch-all segments (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmanns authored Sep 8, 2024
1 parent a9878fb commit d1dce9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/odd-lemons-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cloudflare/next-on-pages': patch
---

Fix prerendered dynamic ISR functions with catch-all segments
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ async function tryToFixInvalidDynamicISRFuncs({

const isDynamicISRFunc =
fnInfo.config.operationType === 'ISR' &&
/\/\[[\w-]+\]$/.test(fnPathWithoutRscOrFuncExt);
/\/\[(?:\.\.\.)?[\w-]+\]$/.test(fnPathWithoutRscOrFuncExt);

if (isDynamicISRFunc) {
const matchingPrerenderedChildFunc = prerenderedFunctionEntries.find(
Expand Down

0 comments on commit d1dce9e

Please sign in to comment.