From 19479a3d022d598f68e08216f1c97ca30b2401d2 Mon Sep 17 00:00:00 2001 From: Chau Tran Date: Fri, 5 Mar 2021 22:02:21 -0600 Subject: [PATCH] fix(core): make sure to bind plugin to preMap this context --- packages/core/src/lib/create-mapper/create-mapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/lib/create-mapper/create-mapper.ts b/packages/core/src/lib/create-mapper/create-mapper.ts index 78ea87b9d..ac3ba598c 100644 --- a/packages/core/src/lib/create-mapper/create-mapper.ts +++ b/packages/core/src/lib/create-mapper/create-mapper.ts @@ -61,7 +61,7 @@ export function createMapper({ // run preMap if available const [sourceInstance] = preMap - ? preMap(source, destination, sourceObj) + ? preMap.bind(plugin)(source, destination, sourceObj) : []; // get mapping between Source and Destination