Skip to content

Commit

Permalink
fix(base.ts): fix beforeMap
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Feb 17, 2020
1 parent 39e79d3 commit 630e1b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ export abstract class AutoMapperBase {

if (!isArrayMap) {
if (beforeMap) {
beforeMap(sourceObj, new destination(), { ...mapping });
beforeMap(sourceObj, destinationObj, { ...mapping });
} else if (beforeMapAction) {
beforeMapAction(sourceObj, new destination(), { ...mapping });
beforeMapAction(sourceObj, destinationObj, { ...mapping });
}
}

Expand Down

0 comments on commit 630e1b2

Please sign in to comment.