diff --git a/site/source/components/ServiceWorker.tsx b/site/source/components/ServiceWorker.tsx index de67a5afb..0fc611bde 100644 --- a/site/source/components/ServiceWorker.tsx +++ b/site/source/components/ServiceWorker.tsx @@ -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) }, diff --git a/site/source/components/ShareSimulationBanner/index.tsx b/site/source/components/ShareSimulationBanner/index.tsx index be0948218..94610b689 100644 --- a/site/source/components/ShareSimulationBanner/index.tsx +++ b/site/source/components/ShareSimulationBanner/index.tsx @@ -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