Skip to content

Commit

Permalink
fix(core): make sure to bind plugin to preMap this context
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Mar 6, 2021
1 parent 2c3eaf0 commit 19479a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/lib/create-mapper/create-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function createMapper<TKey = unknown>({

// run preMap if available
const [sourceInstance] = preMap
? preMap(source, destination, sourceObj)
? preMap.bind(plugin)(source, destination, sourceObj)
: [];

// get mapping between Source and Destination
Expand Down

0 comments on commit 19479a3

Please sign in to comment.