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

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
static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx

@@ -111,7 +111,7 @@ function ProjectApdexScoreCard(props: Props) {
 
   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 =
     defined(apdex) && defined(previousApdex)