Skip to content

isaac-martin/static-paths

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

A slug with a / passed to getStaticPaths parameter will not generate correctly and is marked as router.isFallback despite it being generated in the first place. But it will not throw an error during the staticProps lifecycle. Subsequently this also means that the ASCII encoding for / which is %2F is treated seperately from / when they should be treated as the same page.

image

This is somewhat called out in the docs https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes#optional-catch-all-segments however i think that when next encounters a catch all segment that includes a / inside it - error on the build, or apply a sement.split('/') and spread the result of this into the array of segments.

subsequently the / and %2F should be treated the same - as it is currently you could in theory generate two seperate pages for these when they should error / be the same

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors