Skip to content

Commit 3378313

Browse files
[ML] Fixes display of regression stop stats if one is NaN (#72412) (#72458)
1 parent 5822f5d commit 3378313

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugins/ml/public/application/data_frame_analytics/common

1 file changed

+1
-1
lines changed

x-pack/plugins/ml/public/application/data_frame_analytics/common/analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ export function getValuesFromResponse(response: RegressionEvaluateResponse) {
446446
if (response.regression.hasOwnProperty(statType)) {
447447
let currentStatValue =
448448
response.regression[statType as keyof RegressionEvaluateResponse['regression']]?.value;
449-
if (currentStatValue) {
449+
if (currentStatValue && !isNaN(currentStatValue)) {
450450
currentStatValue = Number(currentStatValue.toPrecision(DEFAULT_SIG_FIGS));
451451
}
452452
results[statType as keyof RegressionEvaluateExtractedResponse] = currentStatValue;

0 commit comments

Comments
 (0)