@nestjs/common
Advanced tools
Comparing version 9.3.4 to 9.3.5
{ | ||
"name": "@nestjs/common", | ||
"version": "9.3.4", | ||
"version": "9.3.5", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@common)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
@@ -86,3 +86,6 @@ "use strict"; | ||
} | ||
return Object.keys(this.validatorOptions).length > 0 | ||
// we check if the number of keys of the "validatorOptions" is higher than 1 (instead of 0) | ||
// because the "forbidUnknownValues" now fallbacks to "false" (in case it wasn't explicitly specified) | ||
const shouldTransformToPlain = Object.keys(this.validatorOptions).length > 1; | ||
return shouldTransformToPlain | ||
? classTransformer.classToPlain(entity, this.transformOptions) | ||
@@ -89,0 +92,0 @@ : value; |
422396
9673