Skip to content

Commit 74c4376

Browse files
committed
fix(common): enforce strin value if not undefined
1 parent 6563c18 commit 74c4376

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/common/pipes/validation.pipe.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ export class ValidationPipe implements PipeTransform<any> {
206206
if (metatype === Number) {
207207
return +value;
208208
}
209-
if (metatype === String) {
210-
if (isUndefined(value)) {
211-
return undefined;
212-
}
209+
if (metatype === String && !isUndefined(value)) {
213210
return String(value);
214211
}
215212
return value;

0 commit comments

Comments
 (0)