Skip to content

Commit

Permalink
fix numeric handler
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jan 8, 2024
1 parent d90fad6 commit 31fe4b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/hooks/useFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as d3 from 'd3';
function isNumeric(str) {
if (typeof str !== 'string') return false; // we only process strings!
return (
!Number.isNaN(str)
!isNaN(str)
// use type coercion to parse the _entirety_ of the string
// (`parseFloat` alone does not do this)...
&& !Number.isNaN(parseFloat(str))
Expand Down

0 comments on commit 31fe4b7

Please sign in to comment.