Skip to content

Commit

Permalink
don't decrease radio index when it equals duplicate index
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Feb 8, 2024
1 parent 4200adb commit f8e8460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/store/modules/radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const mutations = {
if (trackIdSet.has(t.id)) {
const duplicate = state.list.findIndex(s => s.id === t.id);
state.list.splice(duplicate, 1);
if (duplicate <= state.index) state.index--;
if (duplicate < state.index) state.index--;
} else {
trackIdSet.add(t.id);
}
Expand Down

0 comments on commit f8e8460

Please sign in to comment.