chore: defaultValues within group

This commit is contained in:
James
2023-09-28 10:47:54 -04:00
parent 8ea63421f0
commit 796469f7cc
2 changed files with 5 additions and 5 deletions

View File

@@ -34,5 +34,5 @@ export const find: Find = async function find(
sort,
tableName: toSnakeCase(collection),
where: whereArg,
});
})
}

View File

@@ -255,11 +255,11 @@ export const promise = async <T>({
// Traverse subfields
switch (field.type) {
case 'group': {
let groupData = siblingData[field.name] as Record<string, unknown>
let groupDoc = siblingDoc[field.name] as Record<string, unknown>
if (typeof siblingData[field.name] !== 'object') siblingData[field.name] = {}
if (typeof siblingDoc[field.name] !== 'object') siblingDoc[field.name] = {}
if (typeof siblingData[field.name] !== 'object') groupData = {}
if (typeof siblingDoc[field.name] !== 'object') groupDoc = {}
const groupData = siblingData[field.name] as Record<string, unknown>
const groupDoc = siblingDoc[field.name] as Record<string, unknown>
await traverseFields({
id,