Skip to content

Commit cb91d60

Browse files
author
Tim Roes
authored
Fixed NaN comparison (#50000) (#51970)
1 parent 6e56d48 commit cb91d60

File tree

1 file changed

+1
-1
lines changed
  • src/legacy/core_plugins/vis_type_timeseries/public/components

1 file changed

+1
-1
lines changed

src/legacy/core_plugins/vis_type_timeseries/public/components/color_rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ColorRulesUI extends Component {
4646
const part = {};
4747
part[name] = cast(_.get(e, '[0].value', _.get(e, 'target.value')));
4848
if (part[name] === 'undefined') part[name] = undefined;
49-
if (part[name] === NaN) part[name] = undefined;
49+
if (isNaN(part[name])) part[name] = undefined;
5050
handleChange(_.assign({}, item, part));
5151
};
5252
}

0 commit comments

Comments
 (0)