From c42920af1e2c716f2a5f6c098be17a496bb4a27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20L=C3=BCder?= Date: Tue, 9 Aug 2022 15:24:12 -0500 Subject: [PATCH] fix: set default value of config.supportedScanTypes --- src/html5-qrcode-scanner.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/html5-qrcode-scanner.ts b/src/html5-qrcode-scanner.ts index 72fb231..4bd0605 100644 --- a/src/html5-qrcode-scanner.ts +++ b/src/html5-qrcode-scanner.ts @@ -387,6 +387,10 @@ export class Html5QrcodeScanner { = Html5QrcodeConstants.DEFAULT_REMEMBER_LAST_CAMERA_USED; } + if (!config.supportedScanTypes) { + config.supportedScanTypes = Html5QrcodeConstants.DEFAULT_SUPPORTED_SCAN_TYPE; + } + return config; }