chore(workflows): Fix merge conflicts with master

This commit is contained in:
olivermrbl committed 2022-12-07 20:28:32 +01:00
commit 2b2ea157a6
890 files changed
+101176 -38064

No files matched your search

@@ -0,0 +1,36 @@
const errorMap = {}
const handleErrorOverlay = () => {
const errors = Object.values(errorMap)
let errorsToDisplay = []
if (errors.length > 0) {
errorsToDisplay = errors.flatMap(e => e).filter(Boolean)
}
if (errorsToDisplay.length > 0) {
window._gatsbyEvents.push([
`FAST_REFRESH`,
{
action: `SHOW_GRAPHQL_ERRORS`,
payload: errorsToDisplay,
},
])
} else {
window._gatsbyEvents.push([
`FAST_REFRESH`,
{ action: `CLEAR_GRAPHQL_ERRORS` },
])
}
}
export const clearError = errorID => {
delete errorMap[errorID]
handleErrorOverlay()
}
export const reportError = (errorID, error) => {
if (error) {
errorMap[errorID] = error
}
handleErrorOverlay()
}