You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qr box setting qrbox should be optional when calling the camera, but it's not.
If I leave it out of the settings I get a console error.
Reproduction:
Call start on html5QrCode without setting the qrbox in the options.
this.html5QrCode.start(
{ facingMode: "environment" }, // no qr box in the settings
decodedText => {
this.scanData = decodedText;
},
() => {
this.displayGenericMessage();
}
)
Following error occurs.
html5-qrcode.js?4c20:478 Uncaught TypeError: Cannot read properties of undefined (reading 'width')
at Proxy.Html5Qrcode.validateQrboxConfig (html5-qrcode.js?4c20:478)
at Proxy.Html5Qrcode.setupUi (html5-qrcode.js?4c20:491)
at HTMLVideoElement.videoElement.onplaying (html5-qrcode.js?4c20:589)
Tracing the error lead me to this part of the code, where it says that if qr box does not have width or height, the error should be thrown, which makes no sense if this is optional
Html5Qrcode.prototype.validateQrboxConfig = function (qrboxSize) {
if (typeof qrboxSize === "number") {
return;
}
if (qrboxSize.width === undefined || qrboxSize.height === undefined) {
throw "Invalid instance of QrDimensions passed for "
+ "'config.qrbox'.";
}
};
The text was updated successfully, but these errors were encountered:
Qr box setting
qrbox
should be optional when calling the camera, but it's not.If I leave it out of the settings I get a console error.
Reproduction:
Call start on html5QrCode without setting the qrbox in the options.
Following error occurs.
Tracing the error lead me to this part of the code, where it says that if qr box does not have width or height, the error should be thrown, which makes no sense if this is optional
The text was updated successfully, but these errors were encountered: