mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
CM: Fix sync layouts in case no relation is set
This commit is contained in:
parent
e88cce8924
commit
64d31b8bac
@ -138,7 +138,9 @@ function syncLayouts(configuration, schema) {
|
|||||||
list: cleanList.length > 0 ? cleanList : createDefaultListLayout(schema),
|
list: cleanList.length > 0 ? cleanList : createDefaultListLayout(schema),
|
||||||
edit: cleanEdit.length > 0 ? cleanEdit : createDefaultEditLayout(schema),
|
edit: cleanEdit.length > 0 ? cleanEdit : createDefaultEditLayout(schema),
|
||||||
editRelations:
|
editRelations:
|
||||||
cleanEditRelations.length > 0 ? cleanEditRelations : createDefaultEditRelationsLayout(schema),
|
editRelations.length === 0 || cleanEditRelations.length > 0
|
||||||
|
? cleanEditRelations
|
||||||
|
: createDefaultEditRelationsLayout(schema),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user