devhammed / insomnia-plugin-documenter

Export Insomnia workspace HTML documentation.
https://insomnia.rest/plugins/insomnia-plugin-documenter
MIT License
27 stars 2 forks source link

TypeError: Cannot read property 'replace' of null #5

Closed herlandroando closed 3 years ago

herlandroando commented 3 years ago

Hi, I just started using this plugin when I found it in the Insomnia app. I am interested and want to try it. I started in the local environment first. However, when I wanted to try it, I got an error on my console browser like:

TypeError: Cannot read property 'replace' of null
    at Re (formatEnv.js:2)
    at Object.e.$$.update (Request.svelte:32)
    at ne (index.mjs:1284)
    at new ot (Request.svelte:81)
    at Array.gt (Rows.svelte:16)
    at ft (Rows.svelte:12)
    at mt (Rows.svelte:11)
    at ne (index.mjs:1287)
    at new _t (Rows.svelte:8)
    at Array.ht (Rows.svelte:15)

This is for my insomnia.json if you want to see it.

I would like to know if there is a solution to this? I am very interested in this plugin because it really helps my work. Sorry for my bad english. Thank you for responding to this issue. Have a good day!

devhammed commented 3 years ago

@herlandroando The error seems to come from you though we would have been able to prevent it by checking for null values, one of your requests (Profiles Customer Single) doesn't have a URL.

Screenshot from 2021-03-14 23-22-01

After disabling it, the documentation page started showing correctly:

Screenshot from 2021-03-14 23-21-20

The solution is to add a URL to that particular request.

Thank you for using the plugin and don't forget to star the repository if you haven't.

herlandroando commented 3 years ago

Ah, I didn't pay attention to that. Looks like I'm not very careful about this. I followed the instructions you gave @devhammed and it worked!

For sure, I have given a star for this plugin because it helps me a lot. Thank you for your reply.

devhammed commented 3 years ago

You're welcome 😁😁😁