Skip to content

Commit bff9dec

Browse files
authored
fix(admob): AdEventHandler returns javascript (not native) unsubscribe function (#4920)
* [bug] Admob listener wrong unsibscribe function `_setAdEventHandler` method return a wrong unsubscribe function. It should remove js listener, but instead it unsubscribe ad instance from native events and _onAdEventHandler is still could be used by the instance * fix(AdMob): fix linter error
1 parent d6f52ca commit bff9dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/admob/lib/ads/MobileAd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class MobileAd {
6161

6262
_setAdEventHandler(handler) {
6363
this._onAdEventHandler = handler;
64-
return () => this._nativeListener.remove();
64+
return () => (this._onAdEventHandler = null);
6565
}
6666

6767
get adUnitId() {

0 commit comments

Comments
 (0)