diff --git a/app/srv/ws/sync/actions/code_edit.ts b/app/srv/ws/sync/actions/code_edit.ts index 37b89604..c1a84d6e 100644 --- a/app/srv/ws/sync/actions/code_edit.ts +++ b/app/srv/ws/sync/actions/code_edit.ts @@ -91,14 +91,14 @@ export const code_edit: SAction["code"]["edit"] = async function ( }); if (save_to === "comp" && comp_id) { - _db.component.update({ + await _db.component.update({ where: { id: comp_id }, data: { content_tree: root.toJSON(), }, }); } else if (page_id && validate(page_id)) { - _db.page.update({ + await _db.page.update({ where: { id: page_id }, data: { content_tree: root.toJSON(), @@ -128,14 +128,14 @@ export const code_edit: SAction["code"]["edit"] = async function ( }); if (save_to === "comp" && comp_id) { - _db.component.update({ + await _db.component.update({ where: { id: comp_id }, data: { content_tree: root.toJSON(), }, }); } else if (page_id && validate(page_id)) { - _db.page.update({ + await _db.page.update({ where: { id: page_id }, data: { content_tree: root.toJSON(), @@ -189,6 +189,7 @@ export const code_edit: SAction["code"]["edit"] = async function ( } } }); + await _db.component.update({ where: { id: comp_id }, data: {