zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.

Home Page:https://zxing-js.github.io/library/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[WARNING] Comparison with NaN using the "===" operator here is always false

03juan opened this issue · comments

if (NaN === d) return 0;

I got this error message when importing an upstream library and didn't see an issue about it here.

[WARNING] Comparison with NaN using the "===" operator here is always false

vendor/html5-qrcode-2.3.4/html5-qrcode-2.3.4/third_party/zxing-js.umd.js:5069:20:
  5069 │             if (NaN === d)
       ╵                     ~~~

Floating-point equality is defined such that NaN is never equal to anything, so "x === NaN" always returns false. You need to use "isNaN(x)" instead to test for NaN.

plz try 0.19.3