Skip to content

Commit a58ac63

Browse files
committed
fix(core): instance check
1 parent 36a83f2 commit a58ac63

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/mlkit-core/index.ios.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import '@nativescript/core';
44
import lazy from '@nativescript/core/utils/lazy';
55
import { DetectionEvent, StillImageDetectionOptions } from '.';
66

7-
const BARCODE_SCANNER_SUPPORTED = lazy(() => typeof MLKBarcodeScanner);
8-
const TEXT_RECOGNITION_SUPPORTED = lazy(() => typeof MLKTextRecognizer);
9-
const FACE_DETECTION_SUPPORTED = lazy(() => typeof MLKFaceDetector);
10-
const IMAGE_LABELING_SUPPORTED = lazy(() => typeof MLKImageLabeler);
11-
const OBJECT_DETECTION_SUPPORTED = lazy(() => typeof MLKObjectDetector);
12-
const POSE_DETECTION_SUPPORTED = lazy(() => typeof MLKPoseDetector);
13-
const DIGITALINK_RECOGNITION_SUPPORTED = lazy(() => typeof MLKDigitalInkRecognizer);
14-
const SELFIE_SEGMENTATION_SUPPORTED = lazy(() => typeof MLKSegmenter);
7+
const BARCODE_SCANNER_SUPPORTED = lazy(() => typeof MLKBarcodeScanner !== 'undefined');
8+
const TEXT_RECOGNITION_SUPPORTED = lazy(() => typeof MLKTextRecognizer !== 'undefined');
9+
const FACE_DETECTION_SUPPORTED = lazy(() => typeof MLKFaceDetector !== 'undefined');
10+
const IMAGE_LABELING_SUPPORTED = lazy(() => typeof MLKImageLabeler !== 'undefined');
11+
const OBJECT_DETECTION_SUPPORTED = lazy(() => typeof MLKObjectDetector !== 'undefined');
12+
const POSE_DETECTION_SUPPORTED = lazy(() => typeof MLKPoseDetector !== 'undefined');
13+
const DIGITALINK_RECOGNITION_SUPPORTED = lazy(() => typeof MLKDigitalInkRecognizer !== 'undefined');
14+
const SELFIE_SEGMENTATION_SUPPORTED = lazy(() => typeof MLKSegmenter !== 'undefined');
1515

1616
export { BarcodeFormats, barcodeFormatsProperty, CameraPosition, cameraPositionProperty, DetectionType, faceDetectionMinFaceSizeProperty, faceDetectionPerformanceModeProperty, faceDetectionTrackingEnabledProperty, imageLabelerConfidenceThresholdProperty as imageLablerConfidenceThresholdProperty, objectDetectionClassifyProperty, objectDetectionMultipleProperty } from './common';
1717

0 commit comments

Comments
 (0)