html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

build fails w/ error "This condition will always return true since this function is always defined"

Open csurf opened this issue 3 years ago • 1 comments

current build fails with the following error:

# tsc --p ../html5-qrcode
../html5-qrcode/src/html5-qrcode.ts:735:39 - error TS2774: This condition will always return true since this function is always defined. Did you mean to call it instead?

735         if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in ../html5-qrcode/src/html5-qrcode.ts:735

tsc version 4.7.4

csurf avatar Jul 18 '22 22:07 csurf

I had the Same problem. I got the script built by editing file tsconfig.json and adding "strictNullChecks": false, inside compilerOptions. Hope this helps.

PHPism avatar Jul 31 '22 19:07 PHPism

should be fixed now, this was removed.

mebjas avatar Nov 17 '22 14:11 mebjas