Skip to content

Commit

Permalink
Merge pull request #724 from magieno/2024-09-fix-issues-with-nested-t…
Browse files Browse the repository at this point in the history
…ypes-in-data-node

- Adds missing conditional to avoid a breakage further down.
  • Loading branch information
etiennenoel authored Sep 12, 2024
2 parents 5d12632 + 3ac7999 commit ad5ae30
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class DataMappingNode extends BaseDataMappingNode {
if(typeof this.destinationType === "function" && !this.destinationType.prototype) {
const destinationType: ArrayMemberTypeFactoryCallbackType = this.destinationType as ArrayMemberTypeFactoryCallbackType;
dest = plainToInstance(destinationType(source, this.sourceProperty, index).constructor, options?.excludeExtraneousValues === false ? element: {});
} else {
} else if(this.destinationType.prototype) {
dest = plainToInstance(this.destinationType as ClassConstructor<any>, {})
}
}
Expand Down

0 comments on commit ad5ae30

Please sign in to comment.