Ignore some error

pull/2819/head
Jérémy Rialland 2023-09-25 17:36:24 +02:00 committed by Jérémy Rialland
parent ded5371705
commit 53852a95c1
2 changed files with 7 additions and 1 deletions

View File

@ -83,6 +83,9 @@ export const ServiceWorker = () => {
},
onRegisterError: (error) => {
if (error instanceof Error && /permission|aborted/i.test(error.message)) {
return
}
// eslint-disable-next-line no-console
console.error('SW registration error', error)
},

View File

@ -68,7 +68,10 @@ export default function ShareOrSaveSimulationBanner({
url,
})
} catch (e) {
if (e instanceof Error && e.toString().includes('AbortError')) {
if (
e instanceof Error &&
(e.toString().includes('AbortError') || /permission/i.test(e.message))
) {
return
}
// eslint-disable-next-line no-console