Skip to content

Commit

Permalink
fix undefined on explode form where value is parsed as array (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimascio authored May 8, 2021
1 parent 4ddfdf8 commit 6e33d98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/middlewares/parsers/req.parameter.mutator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export class RequestParameterMutator {
*/
const field = REQUEST_FIELDS[$in];
if (req[field]?.[name]) {
if (Array.isArray(req[field][name])) return;
const value = req[field][name].split(delimiter);
req[field][name] = value;
}
Expand Down

0 comments on commit 6e33d98

Please sign in to comment.