diff --git a/.eslintrc.json b/.eslintrc.json index 2064f1c..233de72 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -30,6 +30,7 @@ "no-underscore-dangle":0, "no-unused-vars":0, // for now... "no-console": 0, + "consistent-return": 0, "jsx-a11y/label-has-associated-control": [ "error", { diff --git a/source/hooks/useFetch.js b/source/hooks/useFetch.js index 14d3c1c..5e0c25d 100644 --- a/source/hooks/useFetch.js +++ b/source/hooks/useFetch.js @@ -4,7 +4,7 @@ import * as d3 from 'd3'; function isNumeric(str) { if (typeof str !== 'string') return false; // we only process strings! return ( - !isNaN(str) + !Number.isNaN(str) // use type coercion to parse the _entirety_ of the string // (`parseFloat` alone does not do this)... && !Number.isNaN(parseFloat(str))