Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(TypeMapping): Fallback to default value when source is undefined #7

Merged
merged 6 commits into from
Jul 4, 2017

Conversation

emyann
Copy link
Member

@emyann emyann commented Jul 4, 2017

#6

@emyann emyann self-assigned this Jul 4, 2017
@coveralls
Copy link

coveralls commented Jul 4, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling d3396f7 on fix/TypeMapping-Fallback-Default-Value into 63d746d on master.

@coveralls
Copy link

coveralls commented Jul 4, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling b584967 on fix/TypeMapping-Fallback-Default-Value into 63d746d on master.

@coveralls
Copy link

coveralls commented Jul 4, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 69fc935 on fix/TypeMapping-Fallback-Default-Value into 63d746d on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 69fc935 on fix/TypeMapping-Fallback-Default-Value into 63d746d on master.

@emyann
Copy link
Member Author

emyann commented Jul 4, 2017

👋🏽 @ludovicthomas It's now possible to use the default values from Class constructor when the source value is undefined :)

@emyann emyann merged commit 8ef3f13 into master Jul 4, 2017
let transformedObject = _.mapValues(_schema, (predicate) => {
if (!_.isObject(predicate)) { // a predicate string path
let transformedObject = _.mapValues(_schema, (predicate) => { // iterate on every predicate of the schema
if (!_.isObject(predicate)) { // a predicate string path: [ desintation: 'source' ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: destination

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ludovicthomas Good catch! Thanks :)

@emyann emyann deleted the fix/TypeMapping-Fallback-Default-Value branch July 5, 2017 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants