mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 15:36:42 +08:00
added a check to stop the website from freezing
This commit is contained in:
parent
7df64007fe
commit
2025beb4da
1 changed files with 5 additions and 0 deletions
|
@ -52,6 +52,11 @@ export function init(missed, slow) {
|
|||
// console.log(sortableMissedWords);
|
||||
// console.log(sortableSlowWords);
|
||||
|
||||
if (sortableMissedWords.length == 0 && sortableSlowWords.length == 0) {
|
||||
Notifications.add("Could not start a new custom test", 0);
|
||||
return;
|
||||
}
|
||||
|
||||
let newCustomText = [];
|
||||
sortableMissedWords.forEach((missed, index) => {
|
||||
for (let i = 0; i < missed[1]; i++) {
|
||||
|
|
Loading…
Reference in a new issue