Skip to content

Commit

Permalink
Merge pull request #28 from orange-games/dev
Browse files Browse the repository at this point in the history
Fix for when gdApi is not available
  • Loading branch information
AleBles authored Dec 5, 2017
2 parents bc59ad3 + 2f6c064 commit 8d54fc3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions build/phaser-ads.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/phaser-ads.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/phaser-ads.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@orange-games/phaser-ads",
"author": "OrangeGames",
"version": "2.2.3",
"version": "2.2.4",
"description": "A Phaser plugin for providing nice ads integration in your phaser.io game",
"contributors": [
{
Expand Down
5 changes: 3 additions & 2 deletions ts/Providers/GameDistributionAds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ module PhaserAds {
this.adManager.unMuteAfterAd();
this.adManager.onContentResumed.dispatch();
} else {
if (gdApi && typeof gdApi.showBanner === 'undefined') {
//So gdApi is available, but showBanner is not there (weird but can happen)
if (typeof gdApi === 'undefined' || (gdApi && typeof gdApi.showBanner === 'undefined')) {
//So gdApi isn't available OR
//gdApi is available, but showBanner is not there (weird but can happen)
this.adsEnabled = false;

this.adManager.unMuteAfterAd();
Expand Down

0 comments on commit 8d54fc3

Please sign in to comment.