File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -148,27 +148,29 @@ export function Evals({
148148 </ TableCell >
149149 < TableCell className = "border-r" > { formatCurrency ( run . taskMetrics . cost ) } </ TableCell >
150150 < TableCell className = "text-muted-foreground" >
151- { run . languageScores ?. go !== undefined ? `${ formatScore ( run . languageScores . go ) } %` : "-" }
151+ { run . languageScores ?. go !== undefined
152+ ? `${ formatScore ( run . languageScores . go ) } %`
153+ : formatScore ( undefined ) }
152154 </ TableCell >
153155 < TableCell className = "text-muted-foreground" >
154156 { run . languageScores ?. java !== undefined
155157 ? `${ formatScore ( run . languageScores . java ) } %`
156- : "-" }
158+ : formatScore ( undefined ) }
157159 </ TableCell >
158160 < TableCell className = "text-muted-foreground" >
159161 { run . languageScores ?. javascript !== undefined
160162 ? `${ formatScore ( run . languageScores . javascript ) } %`
161- : "-" }
163+ : formatScore ( undefined ) }
162164 </ TableCell >
163165 < TableCell className = "text-muted-foreground" >
164166 { run . languageScores ?. python !== undefined
165167 ? `${ formatScore ( run . languageScores . python ) } %`
166- : "-" }
168+ : formatScore ( undefined ) }
167169 </ TableCell >
168170 < TableCell className = "text-muted-foreground" >
169171 { run . languageScores ?. rust !== undefined
170172 ? `${ formatScore ( run . languageScores . rust ) } %`
171- : "-" }
173+ : formatScore ( undefined ) }
172174 </ TableCell >
173175 < TableCell className = "font-bold" > { run . score } %</ TableCell >
174176 </ TableRow >
Original file line number Diff line number Diff line change 1- export const formatScore = ( score : number ) => Math . round ( score * 100 )
1+ export const formatScore = ( score : number | null | undefined ) => {
2+ if ( score === null || score === undefined ) {
3+ return "-"
4+ }
5+ return Math . round ( score * 100 )
6+ }
You can’t perform that action at this time.
0 commit comments