diff --git a/src/chart/parameter/component/DateParameterSelect.tsx b/src/chart/parameter/component/DateParameterSelect.tsx index 25d2e0f65..0046e737c 100644 --- a/src/chart/parameter/component/DateParameterSelect.tsx +++ b/src/chart/parameter/component/DateParameterSelect.tsx @@ -55,7 +55,7 @@ const DatePickerParameterSelectComponent = (props: ParameterSelectProps) => { setInputDate(newValue); // Check whether the user has inputted a valid year. If not, do not update the parameter. - if (!newValue || isNaN(newValue.$y) || isNaN(newValue.$m) || isNaN(newValue.$d)) { + if (!newValue || Number.isNaN(newValue.$y) || Number.isNaN(newValue.$m) || Number.isNaN(newValue.$d)) { return; } if (newValue == null && clearParameterOnFieldClear) { diff --git a/src/extensions/advancedcharts/chart/gauge/GaugeChart.tsx b/src/extensions/advancedcharts/chart/gauge/GaugeChart.tsx index 443628dcb..4471871eb 100644 --- a/src/extensions/advancedcharts/chart/gauge/GaugeChart.tsx +++ b/src/extensions/advancedcharts/chart/gauge/GaugeChart.tsx @@ -42,7 +42,7 @@ const NeoGaugeChart = (props: ChartProps) => { const chartId = createUUID(); let score = records && records[0] && records[0]._fields && records[0]._fields[0] ? records[0]._fields[0] : ''; - if (isNaN(score)) { + if (Number.isNaN(score)) { return ; } if (score.low != undefined) { diff --git a/src/extensions/advancedcharts/chart/radar/RadarChart.tsx b/src/extensions/advancedcharts/chart/radar/RadarChart.tsx index 4fec1e6d0..29fdd607f 100644 --- a/src/extensions/advancedcharts/chart/radar/RadarChart.tsx +++ b/src/extensions/advancedcharts/chart/radar/RadarChart.tsx @@ -67,7 +67,7 @@ const NeoRadarChart = (props: ChartProps) => { const entry = {}; selection.values.concat([selection.index]).forEach((k) => { const fieldIndex = r._fieldLookup[k]; - if (k !== selection.index && isNaN(r._fields[fieldIndex])) { + if (k !== selection.index && Number.isNaN(r._fields[fieldIndex])) { valid = false; } entry[k] = `${r._fields[fieldIndex]}`; diff --git a/src/extensions/advancedcharts/chart/sankey/SankeyChart.tsx b/src/extensions/advancedcharts/chart/sankey/SankeyChart.tsx index cb333ba50..a60c8b514 100644 --- a/src/extensions/advancedcharts/chart/sankey/SankeyChart.tsx +++ b/src/extensions/advancedcharts/chart/sankey/SankeyChart.tsx @@ -86,7 +86,7 @@ const NeoSankeyChart = (props: ChartProps) => { properties: value.properties, value: 1, }); - } else if (value.properties[labelProperty] !== undefined && !isNaN(value.properties[labelProperty])) { + } else if (value.properties[labelProperty] !== undefined && !Number.isNaN(value.properties[labelProperty])) { addItem(links[`${value.start.low},${value.end.low}`], { id: value.identity.low, source: value.start.low,