fix: correctly passes block path inside buildFieldSchemaMap (#3162)

This commit is contained in:
Jarrod Flesch
2023-08-11 10:49:52 -04:00
committed by GitHub
parent f9807b5bd5
commit 3c60abd61a

View File

@@ -29,8 +29,9 @@ export const buildFieldSchemaMap = (entityFields: Field[]): Map<string, Field[]>
switch (field.type) {
case 'blocks':
field.blocks.forEach((block) => {
fieldMap.set(`${currentPath}.${block.slug}`, block.fields);
buildUpMap(block.fields, currentPath);
const blockPath = `${currentPath}.${block.slug}`;
fieldMap.set(blockPath, block.fields);
buildUpMap(block.fields, blockPath);
});
break;