mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
[WebHost] weighted-settings: Fix a bug in game choice validation
This commit is contained in:
@@ -860,10 +860,6 @@ const validateSettings = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Object.keys(settings.game).length === 0) {
|
||||
errorMessage = 'You have not chosen a game to play!';
|
||||
}
|
||||
|
||||
// Remove any disabled options
|
||||
Object.keys(settings[game]).forEach((setting) => {
|
||||
Object.keys(settings[game][setting]).forEach((option) => {
|
||||
@@ -878,6 +874,10 @@ const validateSettings = () => {
|
||||
});
|
||||
});
|
||||
|
||||
if (Object.keys(settings.game).length === 0) {
|
||||
errorMessage = 'You have not chosen a game to play!';
|
||||
}
|
||||
|
||||
// If an error occurred, alert the user and do not export the file
|
||||
if (errorMessage) {
|
||||
userMessage.innerText = errorMessage;
|
||||
|
Reference in New Issue
Block a user