Unverified Commit a433b9be authored by Luis Durão's avatar Luis Durão Committed by GitHub

Fix bug in catch-all routes with SSG (#10379)

* Fix bug in catch-all routes with SSG

* fix slash
Co-authored-by: 's avatarJoe Haddad <timer150@gmail.com>
parent e90af3f0
...@@ -592,11 +592,9 @@ export async function isPageStatic( ...@@ -592,11 +592,9 @@ export async function isPageStatic(
builtPage = builtPage.replace( builtPage = builtPage.replace(
`[${repeat ? '...' : ''}${validParamKey}]`, `[${repeat ? '...' : ''}${validParamKey}]`,
encodeURIComponent( repeat
repeat ? (paramValue as string[]).map(encodeURIComponent).join('/')
? (paramValue as string[]).join('/') : encodeURIComponent(paramValue as string)
: (paramValue as string)
)
) )
}) })
......
...@@ -109,8 +109,8 @@ const expectedManifestRoutes = () => ({ ...@@ -109,8 +109,8 @@ const expectedManifestRoutes = () => ({
initialRevalidateSeconds: false, initialRevalidateSeconds: false,
srcRoute: null, srcRoute: null,
}, },
'/catchall/another%2Fvalue': { '/catchall/another/value': {
dataRoute: `/_next/data/${buildId}/catchall/another%2Fvalue.json`, dataRoute: `/_next/data/${buildId}/catchall/another/value.json`,
initialRevalidateSeconds: 1, initialRevalidateSeconds: 1,
srcRoute: '/catchall/[...slug]', srcRoute: '/catchall/[...slug]',
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment