Fix editing of content list items

This commit is contained in:
Ramon Wenger 2022-10-06 17:19:25 +02:00
parent e98831577f
commit 2fbd0dccf9
1 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,13 @@ export const simplifyContents = (contents) => {
if (USER_CONTENT_TYPES.includes(c.type)) { if (USER_CONTENT_TYPES.includes(c.type)) {
return c; return c;
} }
console.log(c);
if (c.type === 'content_list_item') {
return {
...c,
contents: simplifyContents(c.contents)
};
}
return { return {
id: c.id, id: c.id,
type: 'readonly' type: 'readonly'