Skip to content

Commit

Permalink
Prevent exception if parameter has no 'name' (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkosova authored May 27, 2020
1 parent c28b832 commit 3e3f117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/validate-semantic/validators/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function checkForDefinition(paramName, pathItem) {
.some(param => param.name === paramName && param.in === "path")

const caseMatch = (op.parameters || [])
.find(param => !(param.name === paramName) && (param.name.toLowerCase() === paramName.toLowerCase()) && param.in === "path")
.find(param => param.name && !(param.name === paramName) && (param.name.toLowerCase() === paramName.toLowerCase()) && param.in === "path")

if(inThisOperation) {
res.found = true
Expand Down

0 comments on commit 3e3f117

Please sign in to comment.