Skip to content

Commit 1f776db

Browse files
author
Michael O'Brien
committed
FIX: nested schemas setting default properties
1 parent aefe1d0 commit 1f776db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Model.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,13 @@ export class Model {
11571157
NOTE: Value templates for unique items may need other properties when removing unique items
11581158
*/
11591159
for (let [name, field] of Object.entries(block.fields)) {
1160-
if (field.schema) continue
1160+
if (field.schema) {
1161+
if (properties[name]) {
1162+
rec[name] = Array.isArray(field.type) ? [] : {}
1163+
this.selectProperties(op, field.block, index, properties[name], params, rec[name])
1164+
}
1165+
continue
1166+
}
11611167
let omit = false
11621168

11631169
if (block == this.block) {

0 commit comments

Comments
 (0)