fix ordering sync

This commit is contained in:
azivner 2018-04-12 18:13:48 -04:00
parent 7a94e21c54
commit 6a57b8a7e7

View File

@ -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);