From 630e1b20cb5fd7aef0987b0e0751e99e883d3225 Mon Sep 17 00:00:00 2001 From: Chau Tran Date: Sun, 16 Feb 2020 23:17:57 -0600 Subject: [PATCH] fix(base.ts): fix beforeMap --- src/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base.ts b/src/base.ts index 6be4c6505..5b5cdf889 100644 --- a/src/base.ts +++ b/src/base.ts @@ -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 }); } }