From 6a57b8a7e71379c269d98c2722ad10eac911fbe4 Mon Sep 17 00:00:00 2001 From: azivner Date: Thu, 12 Apr 2018 18:13:48 -0400 Subject: [PATCH] fix ordering sync --- src/services/sync_update.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/sync_update.js b/src/services/sync_update.js index 46cac889a..c4c358027 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);