@bedrockio/model 0.1.20 → 0.1.21
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/cjs/schema.js +2 -0
- package/package.json +1 -1
- package/src/schema.js +2 -0
package/dist/cjs/schema.js
CHANGED
|
@@ -121,6 +121,8 @@ function attributesToMongoose(attributes) {
|
|
|
121
121
|
} else if (key === 'attributes' && type === 'object') {
|
|
122
122
|
val = attributesToMongoose(val);
|
|
123
123
|
}
|
|
124
|
+
} else if (Array.isArray(val)) {
|
|
125
|
+
val = val.map(attributesToMongoose);
|
|
124
126
|
} else if ((0, _lodash.isPlainObject)(val)) {
|
|
125
127
|
if (isScopeExtension(val)) {
|
|
126
128
|
applyScopeExtension(val, definition);
|
package/package.json
CHANGED
package/src/schema.js
CHANGED
|
@@ -131,6 +131,8 @@ function attributesToMongoose(attributes) {
|
|
|
131
131
|
} else if (key === 'attributes' && type === 'object') {
|
|
132
132
|
val = attributesToMongoose(val);
|
|
133
133
|
}
|
|
134
|
+
} else if (Array.isArray(val)) {
|
|
135
|
+
val = val.map(attributesToMongoose);
|
|
134
136
|
} else if (isPlainObject(val)) {
|
|
135
137
|
if (isScopeExtension(val)) {
|
|
136
138
|
applyScopeExtension(val, definition);
|