mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fix error handling: not inifinite loading wehn error occurs while updating profile
This commit is contained in:
parent
ce3959d248
commit
c3867b8835
@ -178,6 +178,7 @@ export const onUpdateItem = async (state, item, tags, addTag, setLoading, naviga
|
||||
},
|
||||
},
|
||||
})
|
||||
.catch(setLoading(false))
|
||||
.then(() => item && updateItem({ ...item, ...changedItem }))
|
||||
.then(() => {
|
||||
setLoading(false);
|
||||
@ -198,6 +199,7 @@ export const onUpdateItem = async (state, item, tags, addTag, setLoading, naviga
|
||||
},
|
||||
},
|
||||
})
|
||||
.catch(setLoading(false))
|
||||
.then(() => item && addItem({ ...item, ...changedItem, layer: item.layer, user_created: user, type: item.layer?.itemType }))
|
||||
.then(() => {
|
||||
setLoading(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user