Skip to content

Commit

Permalink
- small fix for #1077
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Dec 20, 2023
1 parent c29b995 commit 7f619a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/reducers/api/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ export const getCombinedTargetList = state => {

const target_id_list = state.apiReducers.target_id_list;
const legacy_target_id_list = [...state.apiReducers.legacy_target_id_list];
let max_id = Math.max(...target_id_list.map(target => target.id));
legacy_target_id_list.forEach(target => {
target.id = ++max_id;
});
if (target_id_list?.length > 0) {
let max_id = Math.max(...target_id_list.map(target => target.id));
legacy_target_id_list.forEach(target => {
target.id = ++max_id;
});
}

result = [...target_id_list, ...legacy_target_id_list];

Expand Down

0 comments on commit 7f619a7

Please sign in to comment.