insodoc / insomnia-documenter

Tool to create minimalist and beautiful API documentation pages using your Insomnia workspace export file.
MIT License
494 stars 59 forks source link

FormatEnv function throws an error when url for some requests are empty #66

Closed BadMask121 closed 3 years ago

BadMask121 commented 3 years ago

I had a request without an endpoint when served using vercel it throws an error Screenshot 2021-06-18 at 12 25 41 AM

I looked at the codebase on GitHub and realized formatEnv in Request.svelte was looking up request.url and in one of my API request i had an empty URL input

Screenshot 2021-06-18 at 12 38 53 AM

I believe there should be a better way for handling null values for looking up environment variables.

i'll creeate a PR suggesting a fix for this