diff --git a/WebHostLib/static/assets/player-options.js b/WebHostLib/static/assets/player-options.js index 54fae290..2bb4a3ba 100644 --- a/WebHostLib/static/assets/player-options.js +++ b/WebHostLib/static/assets/player-options.js @@ -463,7 +463,7 @@ const exportOptions = () => { options['description'] = `Generated by https://archipelago.gg with the ${preset} preset.`; } - if (!options.name || options.name.trim().length === 0) { + if (!options.name || options.name.toString().trim().length === 0) { return showUserMessage('You must enter a player name!'); } const yamlText = jsyaml.safeDump(options, { noCompatMode: true }).replaceAll(/'(\d+)':/g, (x, y) => `${y}:`); diff --git a/WebHostLib/static/assets/weighted-options.js b/WebHostLib/static/assets/weighted-options.js index 34dfbae4..19928327 100644 --- a/WebHostLib/static/assets/weighted-options.js +++ b/WebHostLib/static/assets/weighted-options.js @@ -210,7 +210,11 @@ class WeightedSettings { let errorMessage = null; // User must choose a name for their file - if (!settings.name || settings.name.trim().length === 0 || settings.name.toLowerCase().trim() === 'player') { + if ( + !settings.name || + settings.name.toString().trim().length === 0 || + settings.name.toString().toLowerCase().trim() === 'player' + ) { userMessage.innerText = 'You forgot to set your player name at the top of the page!'; userMessage.classList.add('visible'); userMessage.scrollIntoView({ @@ -256,7 +260,7 @@ class WeightedSettings { // Remove empty arrays else if ( - ['exclude_locations', 'priority_locations', 'local_items', + ['exclude_locations', 'priority_locations', 'local_items', 'non_local_items', 'start_hints', 'start_location_hints'].includes(setting) && settings[game][setting].length === 0 ) {