Skip to content

Commit b90bed1

Browse files
ItsChaceDtljk
andauthored
fix(web): don't stop the scanner if barcode not found yet
Co-authored-by: Tang Linchuan <36393586+tljk@users.noreply.github.com>
1 parent 16bdb5b commit b90bed1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/web.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class CapacitorBarcodeScannerWeb extends WebPlugin implements CapacitorBa
122122
};
123123

124124
const OSBarcodeWebScannerErrorCallback = (error: string) => {
125-
if (error.indexOf('NotFoundException') === -1) {
125+
if (error.indexOf('NotFoundException') === -1 && error.indexOf('No barcode or QR code detected') === -1) {
126126
this.stopAndHideScanner();
127127
console.error(`[Scanner Web Error] ${error}`);
128128
reject(error);

0 commit comments

Comments
 (0)