Skip to content

Commit 10f0dbd

Browse files
committed
Fix custom transformation
1 parent 23f79c0 commit 10f0dbd

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
@@ -155,8 +155,9 @@ export class TransformOperationExecutor {
155155
}
156156

157157
if (!this.isCircular(subValue, level)) {
158+
let transformKey = this.transformationType === "plainToClass" ? newValueKey : key;
158159
let finalValue = this.transform(subSource, subValue, type, arrayType, isSubValueMap, level + 1);
159-
finalValue = this.applyCustomTransformations(finalValue, targetType, key);
160+
finalValue = this.applyCustomTransformations(finalValue, targetType, transformKey);
160161
if (newValue instanceof Map) {
161162
newValue.set(newValueKey, finalValue);
162163
} else {

0 commit comments

Comments
 (0)