From ad90f03005ed72c440743d269cd7fe0a9c5c108a Mon Sep 17 00:00:00 2001 From: tljk Date: Wed, 18 Sep 2024 23:55:19 -0400 Subject: [PATCH] fix(web): unhandled error message stop the scanner --- plugin/src/web.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/web.ts b/plugin/src/web.ts index 773bf78..d289575 100644 --- a/plugin/src/web.ts +++ b/plugin/src/web.ts @@ -122,7 +122,7 @@ export class CapacitorBarcodeScannerWeb extends WebPlugin implements CapacitorBa }; const OSBarcodeWebScannerErrorCallback = (error: string) => { - if (error.indexOf('NotFoundException') === -1) { + if (error.indexOf('NotFoundException') === -1 && error.indexOf('No barcode or QR code detected') === -1) { this.stopAndHideScanner(); console.error(`[Scanner Web Error] ${error}`); reject(error);