Skip to content

Commit f8ec9da

Browse files
authored
fix(custom-mode): chart problems in custom mode (@Leonabcd123) (#7293)
### Description Round when user is in custom mode with limit mode being time. Bug fixed: - Switch to custom mode - Set limit to some time - Do tests until you get a finishing time of x.99 - Notice the last value in the chart is less than the value that came before it, and is the value that came before it -0.01
1 parent ace96b3 commit f8ec9da

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

frontend/src/ts/test/test-logic.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,13 @@ export async function finish(difficultyFailed = false): Promise<void> {
915915

916916
// stats
917917
const stats = TestStats.calculateFinalStats();
918-
if (stats.time % 1 !== 0 && Config.mode !== "time") {
918+
if (
919+
stats.time % 1 !== 0 &&
920+
!(
921+
Config.mode === "time" ||
922+
(Config.mode === "custom" && CustomText.getLimitMode() === "time")
923+
)
924+
) {
919925
TestStats.setLastSecondNotRound();
920926
}
921927

0 commit comments

Comments
 (0)