Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit d0ba8f9

Browse files
TypeError: _this.lastVisionImage.getBitmap is not a function:'onSuccess', file:'file:///node_modules/nativescript-plugin-firebase/mlkit/barcodescanning/index.js:66:0 #1325
1 parent 1982cc4 commit d0ba8f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mlkit/barcodescanning/index.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class MLKitBarcodeScanner extends MLKitBarcodeScannerBase {
6868

6969
if (barcodes && barcodes.size() > 0) {
7070

71-
const image: android.graphics.Bitmap = this.lastVisionImage ? this.lastVisionImage.getBitmap() : null;
71+
const image: android.graphics.Bitmap = this.lastVisionImage && this.lastVisionImage.getBitmap ? this.lastVisionImage.getBitmap() : null;
7272

7373
// see https://github.com/firebase/quickstart-android/blob/0f4c86877fc5f771cac95797dffa8bd026dd9dc7/mlkit/app/src/main/java/com/google/firebase/samples/apps/mlkit/textrecognition/TextRecognitionProcessor.java#L62
7474
for (let i = 0; i < barcodes.size(); i++) {

0 commit comments

Comments
 (0)