Skip to content

Commit

Permalink
fix(Diff#map): Don't exclude MOVEs from normal parentId mapping
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Aug 2, 2024
1 parent b5b12b6 commit d2dce29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default class Diff<L1 extends TItemLocation, L2 extends TItemLocation, A
newAction.payload.id = Mappings.mapId(mappingsSnapshot, action.payload, targetLocation)
}

if (oldItem && targetLocation !== ItemLocation.SERVER && action.type !== ActionType.MOVE && action.type !== ActionType.UPDATE) {
if (oldItem && targetLocation !== ItemLocation.SERVER && action.type !== ActionType.MOVE) {
newAction.oldItem.parentId = action.payload.parentId
newAction.payload.parentId = Mappings.mapParentId(mappingsSnapshot, action.oldItem, targetLocation)
} else {
Expand Down

0 comments on commit d2dce29

Please sign in to comment.