Fix "use-isnan" eslint rule

This commit is contained in:
Aurélien Mino 2018-11-20 23:37:47 +01:00
parent 14d9606e2e
commit 785b790887
2 changed files with 2 additions and 3 deletions

View file

@ -18,7 +18,6 @@
"no-useless-concat": "warn",
"no-useless-escape": "warn",
"no-unused-vars": "warn",
"no-var": "warn",
"use-isnan": "warn"
"no-var": "warn"
}
}

View file

@ -318,7 +318,7 @@ var MBImport = (function() {
// convert HH:MM:SS or MM:SS to milliseconds
function hmsToMilliSeconds(str) {
if (typeof str == 'undefined' || str === null || str === NaN || str === '') return NaN;
if (typeof str == 'undefined' || str === null || isNaN(str) || str === '') return NaN;
if (typeof str == 'number') return str;
let t = str.split(':');
let s = 0;