File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/app/component/circular-heatmap Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -198,14 +198,19 @@ export class CircularHeatmapComponent implements OnInit {
198198 data : ProjectData ,
199199 activityName : string
200200 ) : any | undefined {
201- const activity = data . find ( project =>
202- project . Activity . find ( activity => activity . activityName === activityName )
203- ) ;
201+ if ( data ) {
202+ // Find the activity in data that matches the activityName
203+ const card = data . find ( project =>
204+ project . Activity . find (
205+ activity => activity . activityName === activityName
206+ )
207+ ) ;
204208
205- if ( activity ) {
206- return activity . Activity . find (
207- activity => activity . activityName === activityName
208- ) ?. teamsImplemented ;
209+ if ( card ) {
210+ return card . Activity . find (
211+ activity => activity . activityName === activityName
212+ ) ?. teamsImplemented ;
213+ }
209214 }
210215
211216 return undefined ;
You can’t perform that action at this time.
0 commit comments