diff --git a/static/js/rehearser.js b/static/js/rehearser.js index 5402c31..90e0f16 100644 --- a/static/js/rehearser.js +++ b/static/js/rehearser.js @@ -1283,7 +1283,8 @@ $('reh-matchonline-btn')?.addEventListener('click', async () => { if (!nameHit && cands.length > 1) { const taken = new Set(Object.values(rehState.cast).map(c => (c.online?.candidates?.[c.online.picked]?.sample_audio)).filter(Boolean)); const rotated = [...cands.slice(i % cands.length), ...cands.slice(0, i % cands.length)]; - cands = rotated.sort((a, b) => (taken.has(a.sample_audio) ? 1 : 0) - (taken.has(b.sample_audio) ? 1 : 0)); + rotated.sort((a, b) => (taken.has(a.sample_audio) ? 1 : 0) - (taken.has(b.sample_audio) ? 1 : 0)); + cands = rotated; } if (cands.length) { try {