Skip to content

Commit

Permalink
fix multiple targets select (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardZaydler authored Feb 3, 2025
1 parent da1b380 commit 5a73fa4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Components/TriggerEditForm/Components/TargetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ export const TargetsList: FC<IProps> = ({
const handleUpdateAloneMetrics = (targetIndex: number, value: boolean): void => {
const target = `t${targetIndex + 1}`;

if (aloneMetrics === null) {
aloneMetrics = {};
}
const updatedAloneMetrics = { ...aloneMetrics };

updatedAloneMetrics[target] = value;

aloneMetrics[target] = value;
onChange({
alone_metrics: aloneMetrics,
alone_metrics: updatedAloneMetrics,
});
};

Expand Down

0 comments on commit 5a73fa4

Please sign in to comment.