We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fba42b commit e5850d3Copy full SHA for e5850d3
packages/pluggableWidgets/barcode-scanner-web/src/helpers/barcode-detector-utils.tsx
@@ -21,7 +21,12 @@ const mapToNativeFormat = (format: string): string => {
21
22
// Check if BarcodeDetector API is available
23
export const isBarcodeDetectorSupported = (): boolean => {
24
- return typeof globalThis !== "undefined" && "BarcodeDetector" in globalThis;
+ return (
25
+ typeof globalThis !== "undefined" &&
26
+ "BarcodeDetector" in globalThis &&
27
+ "detect" in (globalThis as any).BarcodeDetector &&
28
+ typeof (globalThis as any).BarcodeDetector.detect === "function"
29
+ );
30
};
31
32
// Get supported formats for BarcodeDetector
0 commit comments