Skip to content

Commit

Permalink
feat(browser): upgrade qrcode-reader to ^1.0.4
Browse files Browse the repository at this point in the history
Closes #92
  • Loading branch information
bitjson committed May 17, 2018
1 parent e224df0 commit 08cf523
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"homepage": "https://github.com/bitpay/cordova-plugin-qrscanner",
"main": "dist/cordova-plugin-qrscanner-lib.min.js",
"dependencies": {
"qrcode-reader": "^0.2.2",
"qrcode-reader": "^1.0.4",
"webrtc-adapter": "^3.1.4"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/browser/src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
module = {};
var QrCode = require('qrcode-reader').default;
var qr = new QrCode();
qr.callback = function(result, err){
postMessage({result: result, err: err});
qr.callback = function(err, result) {
postMessage({ result: result, err: err });
};
onmessage = function(event){
var imageData = event.data;
onmessage = function(event) {
var imageData = event.data;
qr.decode(imageData);
};

0 comments on commit 08cf523

Please sign in to comment.