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(
builtPage = builtPage.replace(
`[${repeat ? '...' : ''}${validParamKey}]`,
encodeURIComponent(
repeat
? (paramValue as string[]).join('/')
: (paramValue as string)
)
repeat
? (paramValue as string[]).map(encodeURIComponent).join('/')
: encodeURIComponent(paramValue as string)
)
})
......
......@@ -109,8 +109,8 @@ const expectedManifestRoutes = () => ({
initialRevalidateSeconds: false,
srcRoute: null,
},
'/catchall/another%2Fvalue': {
dataRoute: `/_next/data/${buildId}/catchall/another%2Fvalue.json`,
'/catchall/another/value': {
dataRoute: `/_next/data/${buildId}/catchall/another/value.json`,
initialRevalidateSeconds: 1,
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