@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/model",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Bedrock utilities for model creation.",
5
5
  "type": "module",
6
6
  "scripts": {
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);