Skip to content

Commit

Permalink
also move out other callback
Browse files Browse the repository at this point in the history
  • Loading branch information
brycedorn committed Oct 25, 2018
1 parent f65f68e commit 6e5dc43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ AdManager.prototype.onSlotRenderEnded = function (event) {
if (event.isEmpty) {
element.setAttribute('data-ad-load-state', 'empty');
} else {
if (this.adUnits.units[element.dataset.adUnit].onSlotRenderEnded) {
this.adUnits.units[element.dataset.adUnit].onSlotRenderEnded(event, element);
}

element.setAttribute('data-ad-load-state', 'loaded');
}

if (this.adUnits.units[element.dataset.adUnit].onSlotRenderEnded) {
this.adUnits.units[element.dataset.adUnit].onSlotRenderEnded(event, element);
}

utils.dispatchEvent(element, 'dfpSlotRenderEnded');
};

Expand Down

0 comments on commit 6e5dc43

Please sign in to comment.