Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Fix node update in document editor

Hakan Shehuc07f580cf5f1
diff --git a/desktop/src/components/documents/document-editor.tsx b/desktop/src/components/documents/document-editor.tsx
index 3e37ac2e..21410768 100644
--- a/desktop/src/components/documents/document-editor.tsx
+++ b/desktop/src/components/documents/document-editor.tsx
@@ -185,6 +185,8 @@ export const DocumentEditor = ({ node, nodes }: DocumentEditorProps) => {
const updateNodeMutation = workspace.schema
.updateTable('nodes')
.set({
+ type: newEditorNode.type,
+ parent_id: newEditorNode.parentId,
index: newEditorNode.index,
attrs: newEditorNode.attrs
? JSON.stringify(newEditorNode.attrs)