Skip to content

Commit

Permalink
small refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
ddecrulle committed Nov 5, 2024
1 parent dd28a73 commit 435d631
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions web/src/core/usecases/fileExplorer/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,14 @@ export const { reducer, actions } = createUsecaseActions({
}

switch (ongoingOperation.operation) {
case "create": {
state.objects = state.objects.map(obj => {
const matchingObject = objects.find(
o => o.basename === obj.basename && o.kind === obj.kind
);
return matchingObject ? matchingObject : obj;
});
case "create":
state.objects = state.objects.map(
obj =>
objects.find(
o => o.basename === obj.basename && o.kind === obj.kind
) || obj
);
break;
}
}
},
"commandLogIssued": (
Expand Down

0 comments on commit 435d631

Please sign in to comment.