Skip to content

Commit

Permalink
handle null values for cost and latency
Browse files Browse the repository at this point in the history
  • Loading branch information
aakrem committed Mar 28, 2024
1 parent 361b6d7 commit 5042b9d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ const EvaluationScenarios: React.FC<Props> = () => {
field: "cost",
...getFilterParams("text"),
valueGetter: (params) => {
return formatCurrency(params.data.outputs[0].cost)
return params.data.outputs[0].cost == undefined
? "-"
: formatCurrency(params.data.outputs[0].cost)
},
})

Expand All @@ -158,7 +160,9 @@ const EvaluationScenarios: React.FC<Props> = () => {
field: "latency",
...getFilterParams("text"),
valueGetter: (params) => {
return formatLatency(params.data.outputs[0].latency)
return params.data.outputs[0].latency == undefined
? "-"
: formatLatency(params.data.outputs[0].latency)
},
})
return colDefs
Expand Down

0 comments on commit 5042b9d

Please sign in to comment.