fix: @Expose
with same name not evaluated for all properties
#1503
Labels
type: fix
Issues describing a broken feature.
Description
I have noticed that when using the @expose decorator with the same name for multiple properties in the same class, the transform function is only evaluated for the first property.
For example, consider the following code:
Here's a snippet
Expected behavior
Actual behavior
When
plainToClass
is called with this class and a plain object, only the transform function for thefirstName
property is evaluated, while thelastName
property remains undefined.I believe this is a bug in the class-transformer library, as both properties should be transformed based on their respective transform functions. Correct me if i'm wrong.
The text was updated successfully, but these errors were encountered: