postmanlabs / postman-collection

Javascript module that allows a developer to work with Postman Collections

Home Page:https://www.postmanlabs.com/postman-collection/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect using typeof operator

undermuz opened this issue · comments

In this code:
https://github.com/postmanlabs/postman-collection/blob/main/lib/collection/response.js#L139
https://github.com/postmanlabs/postman-collection/blob/main/lib/collection/request.js#L63

You are using typeof operator incorrectly, because typeof operator returns string with type name like 'undefined', 'function', etc, but not a type.

Fix: #1300