Skip to content

Commit

Permalink
Revert "Remove unecessary conditional"
Browse files Browse the repository at this point in the history
This reverts commit fb4ac2f.

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
  • Loading branch information
konstantinabl committed Aug 1, 2024
1 parent fb4ac2f commit a6fbb72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/validator/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function validateParam(index: number | string, param: any, validation: an
}

if (!Array.isArray(paramType)) {
const result = paramType.test(param);
const result = isArray ? paramType.test(index, param, validation.type[1]) : paramType.test(param);
if (result === false) {
throw predefined.INVALID_PARAMETER(index, `${paramType.error}, value: ${param}`);
}
Expand Down

0 comments on commit a6fbb72

Please sign in to comment.