api cleanup

This commit is contained in:
Henry Jameson 2026-08-04 00:37:18 +03:00
commit 0a7bfce95b
2 changed files with 3 additions and 3 deletions

View file

@ -105,7 +105,7 @@ export const fetchUserByName = ({ name, credentials }) =>
})
.then(({ data }) => data.id)
.catch((error) => {
if (error && error.statusCode === 404) {
if (error?.statusCode === 404) {
// Either the backend does not support lookup endpoint,
// or there is no user with such name. Fallback and treat name as id.
return name