Skip to content

Commit

Permalink
fix(dashboard): parse analysis values with JSON5 to handle NaN. Fixes #…
Browse files Browse the repository at this point in the history
…2758 (#3801)

fix(ui analysis-modal): parse analysis values with JSON5 to handle NaN

Signed-off-by: AppliNH <[email protected]>
  • Loading branch information
AppliNH authored Aug 22, 2024
1 parent a38748b commit 80fff8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/app/components/analysis-modal/transforms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// eslint-disable-file @typescript-eslint/ban-ts-comment
import JSON5 from 'json5'
import * as moment from 'moment';

import {
Expand Down Expand Up @@ -617,7 +618,7 @@ const transformMeasurementValue = (conditionKeys: string[], value?: string): Mea
};
}

const parsedValue = JSON.parse(value);
const parsedValue = JSON5.parse(value);

// single number measurement value
if (isFiniteNumber(parsedValue)) {
Expand Down

0 comments on commit 80fff8e

Please sign in to comment.