Przeglądaj źródła

[web] Fix error: `Cannot read properties of undefined (reading 'startsWith')` (#26844)

https://overleaf.sentry.io/issues/6726737555/

GitOrigin-RevId: 488b64c5cb4a75ac4e77c7cdfb47cd3381a9c8eb
Antoine Clausse 1 rok temu
rodzic
commit
7d5bf2c0dd

+ 1 - 1
services/web/frontend/js/infrastructure/error-reporter.ts

@@ -22,7 +22,7 @@ const isPropensityNetworkError = (err: ErrorEvent) => {
   }
   }
 
 
   return Boolean(
   return Boolean(
-    errorBreadcrumbs[0].data?.url.startsWith(
+    errorBreadcrumbs[0]?.data?.url?.startsWith(
       'https://analytics.propensity.com/'
       'https://analytics.propensity.com/'
     )
     )
   )
   )