Skip to content

Commit 017f34a

Browse files
committed
fix(friendlist): handle edge cases where entry acc/raw/consistenty could be 0
1 parent 0ed6973 commit 017f34a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/src/ts/pages/friends.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,13 @@ function formatPb(entry?: PersonalBest):
372372
`${result.wpm} wpm`,
373373
];
374374

375-
if (entry.acc) {
375+
if (entry.acc || entry.acc === 0) {
376376
details.push(`${result.acc} acc`);
377377
}
378-
if (entry.raw) {
378+
if (entry.raw || entry.raw === 0) {
379379
details.push(`${result.raw} raw`);
380380
}
381-
if (entry.consistency) {
381+
if (entry.consistency || entry.consistency === 0) {
382382
details.push(`${result.con} con`);
383383
}
384384
if (entry.timestamp) {

0 commit comments

Comments
 (0)