Skip to content

Commit

Permalink
fix singleplayer stats recording
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey-wu committed Oct 14, 2024
1 parent ada566a commit 4a9f1dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/singleplayer/tossups/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async function next ({ packetLength, oldTossup, tossup: nextTossup, type }) {
document.getElementById('question-number-info').textContent = nextTossup.number;
document.getElementById('set-name-info').textContent = nextTossup.set.name;

if (type === 'next' && await account.getUsername() && document.getElementById('answer').innerHTML) {
if (type === 'next' && await account.getUsername()) {
const pointValue = room.previous.isCorrect ? (room.previous.inPower ? room.previous.powerValue : 10) : (room.previous.endOfQuestion ? 0 : room.previous.negValue);
questionStats.recordTossup(room.previous.tossup, room.previous.isCorrect, pointValue, room.previous.celerity, false);
}
Expand Down
2 changes: 1 addition & 1 deletion client/singleplayer/tossups/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a9f1dd

Please sign in to comment.