Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
🐛 Issue #364: UPC_A codes now scans with extra 0 at the start
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Jul 18, 2017
1 parent 919a626 commit f311bee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/barcodescanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ BarcodeScanner.prototype.scan = function (successCallback, errorCallback, config
exec(
function(result) {
scanInProgress = false;
// work around bug in ZXing library
if (result.format === 'UPC_A' && result.text.length === 13) {
result.text = result.text.substring(1);
}
successCallback(result);
},
function(error) {
Expand Down

0 comments on commit f311bee

Please sign in to comment.