Просмотр исходного кода

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

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

GitOrigin-RevId: 488b64c5cb4a75ac4e77c7cdfb47cd3381a9c8eb
Antoine Clausse 1 год назад
Родитель
Сommit
7d5bf2c0dd
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/web/frontend/js/infrastructure/error-reporter.ts

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

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