File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export class MLKitView extends MLKitViewBase {
96
96
try {
97
97
let data = JSON . parse ( result ) ;
98
98
if ( owner . detectionType === DetectionType . Object || owner . detectionType === DetectionType . CustomObject ) {
99
- if ( owner . _boundingBoxSettings . drawBBoxes || owner . _boundingBoxSettings . drawEdgeMarks ) {
99
+ if ( owner . _boundingBoxSettings ? .drawBBoxes || owner . _boundingBoxSettings ? .drawEdgeMarks ) {
100
100
owner . drawBoundingBoxes ( data ) ;
101
101
}
102
102
}
@@ -540,10 +540,10 @@ export class MLKitView extends MLKitViewBase {
540
540
}
541
541
542
542
public onLayout ( left : number , top : number , right : number , bottom : number ) {
543
- if ( this . _preview ) {
543
+ if ( this . _preview && this . nativeView ) {
544
544
this . _preview . frame = this . nativeView . bounds ;
545
545
}
546
- if ( this . _overlayLayer ) {
546
+ if ( this . _overlayLayer && this . nativeView ) {
547
547
this . _overlayLayer . frame = this . nativeView . bounds ;
548
548
}
549
549
}
You can’t perform that action at this time.
0 commit comments