Skip to content

Commit

Permalink
fix(common): return undefined if string type value is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
LhonRafaat committed Nov 28, 2024
1 parent a071a73 commit 6563c18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/common/pipes/validation.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ export class ValidationPipe implements PipeTransform<any> {
return +value;
}
if (metatype === String) {
if (isUndefined(value)) {
return undefined;
}
return String(value);
}
return value;
Expand Down

0 comments on commit 6563c18

Please sign in to comment.