Skip to content

Commit

Permalink
refactor: use new set function
Browse files Browse the repository at this point in the history
  • Loading branch information
emyann committed Mar 17, 2019
1 parent 2151b1a commit 05a1a30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/morphism.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @module morphism
*/
import { zipObject, isUndefined, set, get } from './helpers';
import { zipObject, isUndefined, get, set } from './helpers';
import { Schema, StrictSchema, Constructable } from './types';
import { MophismSchemaTree, parseSchema } from './MorphismTree';
import { MorphismRegistry, IMorphismRegistry } from './MorphismRegistry';
Expand Down Expand Up @@ -43,7 +43,8 @@ function transformValuesFromObject<Source, Target>(
};

const finalValue = undefinedValueCheck(get(finalObject, chunk.targetPropertyPath), chunk.preparedAction);
return set(finalObject, chunk.targetPropertyPath, finalValue);
set(finalObject, chunk.targetPropertyPath, finalValue);
return finalObject;
}, objectToCompute);
}

Expand Down

0 comments on commit 05a1a30

Please sign in to comment.