mapper-factory 1.0.7 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mapper.js +2 -2
- package/package.json +1 -1
package/dist/mapper.js
CHANGED
|
@@ -72,7 +72,7 @@ function MapperFactory(baseClass = Object) {
|
|
|
72
72
|
let obj = {};
|
|
73
73
|
Object.keys(this).forEach(propertyName => {
|
|
74
74
|
var _a, _b, _c, _d;
|
|
75
|
-
if (Object.keys(metadataList).
|
|
75
|
+
if (Object.keys(metadataList).some(prop => prop == propertyName)) {
|
|
76
76
|
const src = metadataList[propertyName].src || propertyName;
|
|
77
77
|
if (src.includes('.')) {
|
|
78
78
|
let props = src.split('.');
|
|
@@ -145,7 +145,7 @@ function MapperFactory(baseClass = Object) {
|
|
|
145
145
|
objToModel(obj) {
|
|
146
146
|
const metadataList = (0, field_decorator_1.getMapFieldMetadataList)(this);
|
|
147
147
|
Object.keys(obj).forEach(propertyName => {
|
|
148
|
-
if (Object.keys(metadataList).
|
|
148
|
+
if (Object.keys(metadataList).some(prop => prop == propertyName)) {
|
|
149
149
|
if (metadataList[propertyName].transformer) {
|
|
150
150
|
this[propertyName].objToModel(obj[propertyName]);
|
|
151
151
|
}
|