From e0ae410c164d7b84205b9e6ff28f1124098e5370 Mon Sep 17 00:00:00 2001 From: Adam Wolf Date: Thu, 17 Nov 2022 07:57:43 -0600 Subject: [PATCH] Hide CameraSelectionContainer when only one camera (#607) --- src/html5-qrcode-scanner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html5-qrcode-scanner.ts b/src/html5-qrcode-scanner.ts index 5a16710..8fedfda 100644 --- a/src/html5-qrcode-scanner.ts +++ b/src/html5-qrcode-scanner.ts @@ -704,7 +704,7 @@ export class Html5QrcodeScanner { "select", this.getCameraSelectionId()); if (numCameras === 1) { // If only one camera is found, don't show camera selection. - cameraSelectionSelect.style.display = "none"; + cameraSelectionContainer.style.display = "none"; } else { // Otherwise, show the number of cameras found as well. const selectCameraString = Html5QrcodeScannerStrings.selectCamera();