Update error for mis-matching path in getStaticPaths (#20767)

This updates the error shown when a path doesn't match the dynamic route in `getStaticPaths` to not include the `locale` since this isn't considered when matching against the dynamic route.
This commit is contained in:
JJ Kasper 2021-01-06 04:27:32 -06:00 committed by GitHub
parent b9ba264bd6
commit 991ad9225a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -595,7 +595,7 @@ export async function buildStaticPaths(
const result = _routeMatcher(cleanedEntry)
if (!result) {
throw new Error(
`The provided path \`${entry}\` does not match the page: \`${page}\`.`
`The provided path \`${cleanedEntry}\` does not match the page: \`${page}\`.`
)
}