joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
596 stars 104 forks source link

fix: allow variable replacement in collection without variable key #137

Closed devNoiseConsulting closed 3 years ago

devNoiseConsulting commented 3 years ago

Fixes TypeError: Cannot read property 'reduce' of undefined error.

The user may define the variables at the environment level. In these cases, the variables are not exported in the collection JSON. Added a check to variable so that the reduce function is not called on undefined.

joolfe commented 3 years ago

@devNoiseConsulting thanks for report the bug I will review as soon as I have time

joolfe commented 3 years ago

version 1.16.1 should fix this, thanks!