Comparing version 0.0.10 to 0.1.0
# CHANGELOG.md | ||
## 0.1.0 | ||
###### _2018-08-10_ | ||
We've graduated from Alpha to Beta! Semver has been updated so breaking vs. non-breaking changes | ||
can be more easily identified go forward. | ||
- A bug was discovered where a subdocument array could not reference a multi-part path. That is, | ||
the subdocument array had a path in the format of `x.y` indicating the data was located at a | ||
particular attribute and value and the array should iterate across the subvalue. In this structure, | ||
the properties in the subdocument arrays would end up empty. This has been corrected. @shawnmcknight | ||
## 0.0.10 | ||
@@ -3,0 +12,0 @@ ###### _2018-06-12_ |
{ | ||
"name": "mvom", | ||
"author": "STORIS", | ||
"version": "0.0.10", | ||
"version": "0.1.0", | ||
"description": "Multivalue Object Mapper", | ||
@@ -6,0 +6,0 @@ "main": "./index.js", |
@@ -170,3 +170,3 @@ 'use strict'; | ||
const makeSubRecord = iteration => this._valueSchema.getMvPaths().reduce((acc, path) => { | ||
const value = (0, _getFromMvArray2.default)(record, [path, iteration]); | ||
const value = (0, _getFromMvArray2.default)(record, path.concat([iteration])); | ||
if (typeof value !== 'undefined') { | ||
@@ -173,0 +173,0 @@ (0, _set2.default)(acc, path, value); |
@@ -27,3 +27,3 @@ 'use strict'; | ||
if (record[path[0]] == null) { | ||
if (record[path[0]] == null || path.length === 3 && record[path[0]][path[1]] == null) { | ||
// if the entire contents of the record at the base path is null then we must treat this as a special case: | ||
@@ -30,0 +30,0 @@ // - returning undefined won't alter the behavior of simple data types (e.g. string, Boolean) since the undefined |
184125