mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-10 16:48:40 +08:00
fix(testSettings): link with custom limit not applied correctly (@fehmer) (#6917)
fix for https://www.reddit.com/r/monkeytype/comments/1n0p9fk/custom_timer_changes_to_number_of_words_when/
This commit is contained in:
parent
9b93339ac1
commit
984cb3cd9d
1 changed files with 3 additions and 2 deletions
|
@ -200,6 +200,9 @@ export function loadTestSettingsFromUrl(getOverride?: string): void {
|
|||
const customTextSettings = de[2];
|
||||
CustomText.setText(customTextSettings.text);
|
||||
|
||||
//make sure to set mode before the limit as mode also sets the limit
|
||||
CustomText.setMode(customTextSettings.mode ?? "repeat");
|
||||
|
||||
if (customTextSettings.limit !== undefined) {
|
||||
CustomText.setLimitMode(customTextSettings.limit.mode);
|
||||
CustomText.setLimitValue(customTextSettings.limit.value);
|
||||
|
@ -226,8 +229,6 @@ export function loadTestSettingsFromUrl(getOverride?: string): void {
|
|||
CustomText.setPipeDelimiter(true);
|
||||
}
|
||||
|
||||
CustomText.setMode(customTextSettings.mode ?? "repeat");
|
||||
|
||||
applied["custom text settings"] = "";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue