Fix observer analytics crash: guard Nivo edge cases
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m41s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m41s
- Disable enableSlices on ResponsiveLine with single data point (causes null reference in Nivo internal slice computation) - Add null check for slice.points[0] in timeline tooltip - Guard ResponsivePie from empty data array in diversity metrics - Add fallback for scoreDistribution.distribution on both observer and admin reports pages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -532,9 +532,9 @@ function StageAnalytics() {
|
||||
<Skeleton className="h-[350px]" />
|
||||
) : scoreDistribution ? (
|
||||
<ScoreDistributionChart
|
||||
data={scoreDistribution.distribution}
|
||||
averageScore={scoreDistribution.averageScore}
|
||||
totalScores={scoreDistribution.totalScores}
|
||||
data={scoreDistribution.distribution ?? []}
|
||||
averageScore={scoreDistribution.averageScore ?? 0}
|
||||
totalScores={scoreDistribution.totalScores ?? 0}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user