From c2f8cba4af8042b7f8c443ff7f80a1540d7fa967 Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming@riseup.net>
Date: Thu, 27 Jun 2024 00:08:32 -0400
Subject: trigger temporarilyDisableReporting in errorboundary

---
 frontend/src/components/DeckyErrorBoundary.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'frontend/src/components/DeckyErrorBoundary.tsx')

diff --git a/frontend/src/components/DeckyErrorBoundary.tsx b/frontend/src/components/DeckyErrorBoundary.tsx
index 6fe234b7..152e0f09 100644
--- a/frontend/src/components/DeckyErrorBoundary.tsx
+++ b/frontend/src/components/DeckyErrorBoundary.tsx
@@ -32,8 +32,9 @@ const DeckyErrorBoundary: FunctionComponent<DeckyErrorBoundaryProps> = ({ error,
   const [debugAllowed, setDebugAllowed] = useState<boolean>(true);
   // Intentionally doesn't use DeckyState.
   const [versionInfo, setVersionInfo] = useState<VerInfo>();
-  const [errorSource, wasCausedByPlugin] = getLikelyErrorSourceFromValveReactError(error);
+  const [errorSource, wasCausedByPlugin, shouldReportToValve] = getLikelyErrorSourceFromValveReactError(error);
   useEffect(() => {
+    if (!shouldReportToValve) DeckyPluginLoader.errorBoundaryHook.temporarilyDisableReporting();
     DeckyPluginLoader.updateVersion().then(setVersionInfo);
   }, []);
   return (
@@ -64,7 +65,7 @@ const DeckyErrorBoundary: FunctionComponent<DeckyErrorBoundaryProps> = ({ error,
             userSelect: 'auto',
           }}
         >
-          ⚠️ An error occured rendering this content.
+          ⚠️ An error occured while rendering this content.
         </h1>
         <pre style={{}}>
           <code>
-- 
cgit v1.2.3

