Skip to content

Commit

Permalink
fix(common): enforce strin value if not undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
LhonRafaat committed Nov 29, 2024
1 parent 6563c18 commit 74c4376
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/common/pipes/validation.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,7 @@ export class ValidationPipe implements PipeTransform<any> {
if (metatype === Number) {
return +value;
}
if (metatype === String) {
if (isUndefined(value)) {
return undefined;
}
if (metatype === String && !isUndefined(value)) {
return String(value);
}
return value;
Expand Down

0 comments on commit 74c4376

Please sign in to comment.