Skip to content

Commit c434c50

Browse files
committed
Refactor
1 parent efc8f44 commit c434c50

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

frontend/src/ts/test/result.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,8 @@ function updateConsistency(): void {
432432
}
433433

434434
function updateTime(): void {
435-
const afkSecondsRaw = result.afkDuration / result.testDuration;
436435
const afkSecondsPercent = Numbers.roundTo2(
437-
isNaN(afkSecondsRaw) ? 0 : afkSecondsRaw * 100,
436+
(result.afkDuration / result.testDuration) * 100 || 0,
438437
);
439438
qs("#result .stats .time .bottom .afk")?.setText("");
440439
if (afkSecondsPercent > 0) {

0 commit comments

Comments
 (0)