File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " class-transformer" ,
3
- "version" : " 0.1.0 " ,
3
+ "version" : " 0.1.1 " ,
4
4
"description" : " Proper decorator-based transformation / serialization / deserialization of plain javascript objects to class constructors" ,
5
5
"license" : " MIT" ,
6
6
"readmeFilename" : " README.md" ,
Original file line number Diff line number Diff line change @@ -147,11 +147,10 @@ export class TransformOperationExecutor {
147
147
// throw new Error(`Cannot determine type for ${(targetType as any).name }.${propertyName}, did you forget to specify a @Type?`);
148
148
149
149
// if newValue is a source object that has method that match newKeyName then skip it
150
- let hasDescriptor = false ;
151
150
if ( newValue . constructor . prototype ) {
152
151
const descriptor = Object . getOwnPropertyDescriptor ( newValue . constructor . prototype , newValueKey ) ;
153
- hasDescriptor = ! ! descriptor ;
154
- if ( ( this . transformationType === "plainToClass" || this . transformationType === "classToClass" ) && ( newValue [ newValueKey ] instanceof Function || descriptor ) ) // || operationType === "classToClass"
152
+ if ( ( this . transformationType === "plainToClass" || this . transformationType === "classToClass" )
153
+ && ( newValue [ newValueKey ] instanceof Function || ( descriptor && ! descriptor . set ) ) ) // || operationType === "classToClass"
155
154
continue ;
156
155
}
157
156
You can’t perform that action at this time.
0 commit comments