We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e64d034 commit c47b76bCopy full SHA for c47b76b
src/worker/jsqr.js
@@ -18,7 +18,14 @@ export default () => {
18
19
self.addEventListener("message", function(event) {
20
const imageData = event.data;
21
- const result = jsQR(imageData.data, imageData.width, imageData.height);
+ let result = null;
22
+ try {
23
+ result = jsQR(imageData.data, imageData.width, imageData.height);
24
+ } catch (error) {
25
+ if (!(error instanceof RangeError)) {
26
+ throw error;
27
+ }
28
29
30
let content = null;
31
let location = null;
0 commit comments