Fixed infinite loop.
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

This commit is contained in:
Tom Butcher 2026-03-01 02:19:40 +00:00
parent b1d86cad19
commit f446bb22be

View File

@ -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)