docs(nxdev): fix redirect issue for js/node (#8283)

This commit is contained in:
Benjamin Cabanes 2021-12-22 19:52:41 -05:00 committed by GitHub
parent 592d0e9aba
commit 0ce29cc516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,7 +185,10 @@ export async function getStaticProps({
) ?? defaultFlavor;
// If we use the ID of version or flavor, redirect using the ALIAS instead (redirection is permanent)
if (params.segments[0] === version.id || params.segments[1] === flavor.id) {
if (
params.segments.join('/') !== 'js/node' && // Bug due to node flavour, not a problem when flavourless
(params.segments[0] === version.id || params.segments[1] === flavor.id)
) {
return {
redirect: {
destination: `/${version.alias}/${flavor.alias}/${params.segments