fix
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -383,8 +383,13 @@ function detectImageFile(detector, file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function startScanForImage() {
|
export function startScanForImage() {
|
||||||
return createBarcodeDetector(getConfig("webScanType")).then(detector => {
|
return chooseImageFile().then(file => {
|
||||||
return chooseImageFile().then(file => detectImageFile(detector, file));
|
if (!file) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return createBarcodeDetector(getConfig("webScanType")).then(detector => {
|
||||||
|
return detectImageFile(detector, file);
|
||||||
|
});
|
||||||
}).then(code => {
|
}).then(code => {
|
||||||
if (code && code.rawValue) {
|
if (code && code.rawValue) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user