Skip to content

Commit

Permalink
Handle cases of missing series values during tooltip formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbrucker committed Oct 29, 2023
1 parent 8c47a16 commit aece6fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/harvester-card/harvester-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ export class HarvesterCardComponent implements OnInit, OnDestroy {

}).join('<br/>')

const date: string | undefined = params.at(0)?.value.at(0)
const date: string | undefined = params.at(0)?.value?.at(0)
if (date === undefined) {
return seriesTooltip
}
Expand All @@ -920,8 +920,8 @@ export class HarvesterCardComponent implements OnInit, OnDestroy {
if (params === undefined) {
return ''
}
const date: string | undefined = params.at(0)?.value.at(0)
const proofTime: number | undefined = params.at(0)?.value.at(1)
const date: string | undefined = params.at(0)?.value?.at(0)
const proofTime: number | undefined = params.at(0)?.value?.at(1)
if (date === undefined || proofTime === undefined) {
return ''
}
Expand Down

0 comments on commit aece6fe

Please sign in to comment.