Skip to content

Commit 1a07ffc

Browse files
authored
fix(config): numbers and punctuation always reset to false (@fehmer) (monkeytypegame#6830)
1 parent df8cb07 commit 1a07ffc

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

frontend/__tests__/root/config.spec.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,20 @@ describe("Config", () => {
11631163
expected: Partial<ConfigType>;
11641164
}[] = [
11651165
{
1166-
display: "quote length shouldnt override mode",
1167-
value: { quoteLength: [0], mode: "time" },
1168-
expected: { quoteLength: [0], mode: "time" },
1166+
display:
1167+
"quote length shouldnt override mode, punctuation and numbers",
1168+
value: {
1169+
punctuation: true,
1170+
numbers: true,
1171+
quoteLength: [0],
1172+
mode: "time",
1173+
},
1174+
expected: {
1175+
punctuation: true,
1176+
numbers: true,
1177+
quoteLength: [0],
1178+
mode: "time",
1179+
},
11691180
},
11701181
];
11711182

frontend/src/ts/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,12 @@ const lastConfigsToApply: Set<keyof Config> = new Set([
810810
"minAcc",
811811
"minBurst",
812812
"paceCaret",
813-
"punctuation",
813+
"quoteLength", //quote length sets mode,
814+
"words",
815+
"mode", // mode sets punctuation and numbers
814816
"numbers",
815-
"quoteLength",
817+
"punctuation",
816818
"time",
817-
"words",
818-
"mode",
819819
"funbox",
820820
]);
821821

0 commit comments

Comments
 (0)