Skip to content

Commit af605ae

Browse files
committed
Merge branch 'class-transform'
2 parents 201e621 + 10f0dbd commit af605ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TransformOperationExecutor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ export class TransformOperationExecutor {
158158
}
159159

160160
if (!this.isCircular(subValue, level)) {
161+
let transformKey = this.transformationType === "plainToClass" ? newValueKey : key;
161162
let finalValue = this.transform(subSource, subValue, type, arrayType, isSubValueMap, level + 1);
162-
finalValue = this.applyCustomTransformations(finalValue, targetType, key);
163+
finalValue = this.applyCustomTransformations(finalValue, targetType, transformKey);
163164
if (newValue instanceof Map) {
164165
newValue.set(newValueKey, finalValue);
165166
} else {

0 commit comments

Comments
 (0)