Skip to content

Commit

Permalink
Fix prerendered dynamic ISR functions with catch-all segments
Browse files Browse the repository at this point in the history
  • Loading branch information
benmanns committed Aug 26, 2024
1 parent 12080f6 commit 64e4d8a
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 64e4d8a

Please sign in to comment.