Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix ordering sync
azivner6a57b8a7e713
diff --git a/src/services/sync_update.js b/src/services/sync_update.jsindex 46cac889a1..c4c3580274 100644--- a/src/services/sync_update.js+++ b/src/services/sync_update.js@@ -96,8 +96,8 @@ async function updateNoteRevision(entity, sourceId) {async function updateNoteReordering(entity, sourceId) {await sql.transactional(async () => {- Object.keys(entity.ordering).forEach(async key => {- await sql.execute("UPDATE branches SET notePosition = ? WHERE branchId = ?", [entity.ordering[key], key]);+ Object.keys(entity).forEach(async key => {+ await sql.execute("UPDATE branches SET notePosition = ? WHERE branchId = ?", [entity[key], key]);});await syncTableService.addNoteReorderingSync(entity.parentNoteId, sourceId);