Skip to content

Commit

Permalink
fix(base.ts): pass default value to instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Feb 11, 2020
1 parent 2ed1efc commit 14a00a1
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
@@ -1,6 +1,6 @@
import set from 'lodash.set';
import { instantiate } from './metadata-explorer';
import { defaultMapActionOptions } from './constants';
import { instantiate } from './metadata-explorer';
import {
BaseOf,
ConditionTransformation,
Expand Down Expand Up @@ -112,7 +112,7 @@ export abstract class AutoMapperBase {
isArrayMap: boolean = false
): TDestination {
!(sourceObj instanceof mapping.source) &&
(sourceObj = instantiate(mapping.source));
(sourceObj = instantiate(mapping.source, sourceObj));
const { afterMap, beforeMap } = option;
const {
destination,
Expand Down

0 comments on commit 14a00a1

Please sign in to comment.