Skip to content

Commit a3eb5e5

Browse files
committed
Fix: Crash when suspending & resuming NativeAd.
1 parent 6779470 commit a3eb5e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/firebase-admob/nativead/index.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class NativeAdView extends NativeAdViewBase implements AddChildFromBuilde
2828

2929
onLoaded(){
3030
super.onLoaded();
31-
if(this.#child){
31+
if(this.#child && this.#native.indexOfChild(this.#child.nativeView) === -1) {
3232
(this.#native as any).addView(this.#child.nativeView);
3333
}
3434
}

0 commit comments

Comments
 (0)