From 6563c18417dbcb4acb094db3c4d538a499daee4c Mon Sep 17 00:00:00 2001 From: lhonRafaat Date: Thu, 28 Nov 2024 21:22:22 +0300 Subject: [PATCH] fix(common): return undefined if string type value is undefined --- packages/common/pipes/validation.pipe.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/common/pipes/validation.pipe.ts b/packages/common/pipes/validation.pipe.ts index 11de63be218..ede40fb80eb 100644 --- a/packages/common/pipes/validation.pipe.ts +++ b/packages/common/pipes/validation.pipe.ts @@ -207,6 +207,9 @@ export class ValidationPipe implements PipeTransform { return +value; } if (metatype === String) { + if (isUndefined(value)) { + return undefined; + } return String(value); } return value;