Fixed infinite loop.
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
This commit is contained in:
parent
b1d86cad19
commit
f446bb22be
@ -41,7 +41,12 @@ const NotificationProvider = ({ children }) => {
|
||||
return data
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
const is404 = err?.response?.status === 404
|
||||
if (is404) {
|
||||
setNotifications([])
|
||||
} else {
|
||||
showError(err, () => fetchNotifications())
|
||||
}
|
||||
return []
|
||||
} finally {
|
||||
setNotificationsLoading(false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user