Skip to content

Commit

Permalink
fix: issue with initialization of adDisplayContainer
Browse files Browse the repository at this point in the history
Looks like a typo/confusion around initialize method vs. initialized flag
  • Loading branch information
opinxit committed May 21, 2019
1 parent e0d59f5 commit d711072
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sdk-impl.js
Expand Up @@ -330,7 +330,7 @@ SdkImpl.prototype.initAdsManager = function() {
this.adsManager.setVolume(this.controller.getPlayerVolume());
if (!this.adDisplayContainerInitialized) {
this.adDisplayContainer.initialize();
this.adDisplayContainer.initialized = true;
this.adDisplayContainerInitialized = true;
}
} catch (adError) {
this.onAdError(adError);
Expand Down Expand Up @@ -713,8 +713,10 @@ SdkImpl.prototype.setVolume = function(volume) {
*/
SdkImpl.prototype.initializeAdDisplayContainer = function() {
if (this.adDisplayContainer) {
this.adDisplayContainerInitialized = true;
this.adDisplayContainer.initialize();
if (!this.adDisplayContainerInitialized) {
this.adDisplayContainer.initialize();
this.adDisplayContainerInitialized = true;
}
}
};

Expand Down

0 comments on commit d711072

Please sign in to comment.