html5-qrcode
html5-qrcode copied to clipboard
build fails w/ error "This condition will always return true since this function is always defined"
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
I had the Same problem.
I got the script built by editing file tsconfig.json and adding "strictNullChecks": false, inside compilerOptions.
Hope this helps.
should be fixed now, this was removed.