Skip to content

Commit

Permalink
Fix: add checking for null to avoid exception when .setAdUnitId is se…
Browse files Browse the repository at this point in the history
…t twice
  • Loading branch information
almostintuitive authored and koenpunt committed Nov 12, 2017
1 parent 06e48fe commit 5c6d7a4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -106,7 +106,9 @@ private void sendEvent(String eventName, @Nullable WritableMap params) {

@ReactMethod
public void setAdUnitID(String adUnitID) {
mInterstitialAd.setAdUnitId(adUnitID);
if (mInterstitialAd.getAdUnitId() == null) {
mInterstitialAd.setAdUnitId(adUnitID);
}
}

@ReactMethod
Expand Down

0 comments on commit 5c6d7a4

Please sign in to comment.