hotfix: if getting user with team fails, just get the user
This commit is contained in:
parent
69a848daf5
commit
85ccecdcdc
2 changed files with 15 additions and 2 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -42,7 +42,7 @@
|
||||||
"mui-tel-input": "^7.0.0",
|
"mui-tel-input": "^7.0.0",
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"openweathermap-ts": "^1.2.10",
|
"openweathermap-ts": "^1.2.10",
|
||||||
"protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#staging",
|
"protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#master",
|
||||||
"query-string": "^9.2.1",
|
"query-string": "^9.2.1",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-beautiful-dnd": "^13.1.1",
|
"react-beautiful-dnd": "^13.1.1",
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,20 @@ export default function UserWrapper(props: Props) {
|
||||||
firmware: new Map()
|
firmware: new Map()
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).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(() => {
|
.finally(() => {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue