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

fix(project): Undefined access for apdex triggering error (#78388)

All accesses of apdex on this page do a `?.` access, make it consistent
to avoid attempting to access on undefined.
Nar Saynorath 5 месяцев назад
Родитель
Сommit
061ed5367a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx

+ 1 - 1
static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx

@@ -111,7 +111,7 @@ function ProjectApdexScoreCard(props: Props) {
 
 
   const apdex = Number(data?.data?.[0]?.['apdex()']) || undefined;
   const apdex = Number(data?.data?.[0]?.['apdex()']) || undefined;
 
 
-  const previousApdex = Number(previousData?.data?.[0]['apdex()']) || undefined;
+  const previousApdex = Number(previousData?.data?.[0]?.['apdex()']) || undefined;
 
 
   const trend =
   const trend =
     defined(apdex) && defined(previousApdex)
     defined(apdex) && defined(previousApdex)