When typing in the URL https://pokeapi.co/docs , an invalid redirect occurs.
Instead of being redirected to https://pokeapi.co/docs/v2 , you are redirected to docs/v2 (The browser looks for docs/v2 on the user's machine)
If the issue wasn't understood then this image might help.
I'm not that knowledgeable about JS but I think this line is the offending one
When typing in the URL https://pokeapi.co/docs , an invalid redirect occurs. Instead of being redirected to https://pokeapi.co/docs/v2 , you are redirected to docs/v2 (The browser looks for docs/v2 on the user's machine) If the issue wasn't understood then this image might help.
I'm not that knowledgeable about JS but I think this line is the offending one