Fix issue when using an invalid user ID in url

This commit is contained in:
Andrew Kingston 2022-08-04 11:21:31 +01:00
parent 055a04271c
commit 7cc728ca69
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@
async function fetchUser(userId) { async function fetchUser(userId) {
let userPromise = users.get(userId) let userPromise = users.get(userId)
user = await userPromise user = await userPromise
if (!user?._id) {
$goto("./")
}
} }
async function toggleFlags(detail) { async function toggleFlags(detail) {