hotfix: if getting user with team fails, just get the user

This commit is contained in:
Carter 2025-08-13 14:37:38 -06:00
parent 69a848daf5
commit 85ccecdcdc
2 changed files with 15 additions and 2 deletions

View file

@ -82,7 +82,20 @@ export default function UserWrapper(props: Props) {
firmware: new Map()
})
}).catch(() => {
setGlobal(globalDefault)
userAPI.getUser(user_id).then(user => {
setGlobal({
user: user ? user : User.create(),
team: globalDefault.team,
as: "",
showErrors: false,
userTeamPermissions: [],
backgroundTasksComplete: false,
firmware: new Map()
})
}).catch(() => {
setGlobal(globalDefault)
})
})
.finally(() => {
setLoading(false)