Skip to content

Commit

Permalink
map instead forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRA committed May 15, 2023
1 parent 438d102 commit 1bb90a4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/xo-web/src/common/sorted-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,11 @@ const CollapsedActions = decorate([
},
},
computed: {
wrappedActions: ({ runningActions }, { actions }) => {
actions.forEach((action, index) => {
actions[index].isRunning = runningActions.includes(action.label)
})
return [...actions]
},
wrappedActions: ({ runningActions }, { actions }) =>
actions.map(action => {
action.isRunning = runningActions.includes(action.label)
return action
}),
dropdownId: generateId,
actions: ({ wrappedActions: actions }, { items, userData }) =>
actions.map(({ disabled, grouped, handler, icon, isRunning, label, level, redirectOnSuccess }) => {
Expand Down

0 comments on commit 1bb90a4

Please sign in to comment.