upd: change condition

This commit is contained in:
Marie 2024-10-13 11:12:23 +02:00 committed by Hazelnoot
parent 61cb46b171
commit 6b56163931

View file

@ -98,7 +98,7 @@ export class ApQuestionService {
const newCount = apChoices.filter(ap => ap.name === choice).at(0)?.replies?.totalItems; const newCount = apChoices.filter(ap => ap.name === choice).at(0)?.replies?.totalItems;
if (newCount == null) throw new Error('invalid newCount: ' + newCount); if (newCount == null) throw new Error('invalid newCount: ' + newCount);
if (!(oldCount > newCount)) { if (oldCount <= newCount) {
changed = true; changed = true;
poll.votes[poll.choices.indexOf(choice)] = newCount; poll.votes[poll.choices.indexOf(choice)] = newCount;
} }