Skip to content

Commit

Permalink
fix(Merge#reconcileDiffs): Clone with location for concurrent Hierarc…
Browse files Browse the repository at this point in the history
…hy Reversals

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Aug 2, 2024
1 parent da982d6 commit b33524c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/strategies/Merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export default class MergeSyncProcess extends DefaultSyncProcess {
if (targetLocation === ItemLocation.SERVER) {
concurrentHierarchyReversals.forEach(a => {
// moved locally but moved in reverse hierarchical order on server
const payload = a.oldItem.clone() as unknown as TItem<L1> // we don't map here as we want this to look like a local action
const oldItem = a.payload.clone() as unknown as TItem<L2>
const payload = a.oldItem.cloneWithLocation(false, action.payload.location) // we don't map here as we want this to look like a local action
const oldItem = a.payload.cloneWithLocation(false, action.oldItem.location)
oldItem.id = Mappings.mapId(mappingsSnapshot, oldItem, action.payload.location)
oldItem.parentId = Mappings.mapParentId(mappingsSnapshot, oldItem, action.payload.location)

Expand Down

0 comments on commit b33524c

Please sign in to comment.