Merge pull request #433 from postmanlabs/feature/fix-undefined-typeerror

Fixed issue where we threw TypeError for undefined parameters.
This commit is contained in:
Vishal Shingala
2022-01-31 11:44:09 +05:30
committed by GitHub

View File

@@ -500,13 +500,13 @@ module.exports = {
pathParam = [];
}
pathParam.forEach((param, index, arr) => {
if (param.hasOwnProperty('$ref')) {
if (_.has(param, '$ref')) {
arr[index] = this.getRefObject(param.$ref, components, options);
}
});
operationParam.forEach((param, index, arr) => {
if (param.hasOwnProperty('$ref')) {
if (_.has(param, '$ref')) {
arr[index] = this.getRefObject(param.$ref, components, options);
}
});