[F] More detailed error handling

pull/23/head
Azalea 2024-03-18 01:37:57 -04:00
parent 6218424be3
commit e1cdb3ab65
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@
if (!games[game]) {
// Find a valid game
const valid = Object.entries(games).filter(([g, valid]) => valid)
if (!valid) return error = t("UserHome.NoValidGame")
if (!valid || !valid[0]) return error = t("UserHome.NoValidGame")
window.location.href = `/u/${username}/${valid[0][0]}`
}
@ -74,7 +74,7 @@
calElement.scrollLeft = calElement.scrollWidth - calElement.clientWidth
})
}).catch((e) => error = e.message);
}).catch((e) => error = e.message);
}).catch((e) => { error = e.message; console.error(e) } );
</script>
<main id="user-home" class="content">