Skip to content

Commit

Permalink
Lifestreet adapter: ignore unnecessary events from creative. (#1054)
Browse files Browse the repository at this point in the history
* Ignore unnecessary events.

* Fixed warning.
  • Loading branch information
Lifestreet authored and matthewlane committed Mar 28, 2017
1 parent 2e6d865 commit 0288b76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/adapters/lifestreet.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,14 @@ const LifestreetAdapter = function LifestreetAdapter() {
} catch (e) {
return;
}
if (object.message && object.message === PREBID_REQUEST_MESSAGE && object.slotName) {
if (object.message && object.message === PREBID_REQUEST_MESSAGE && object.slotName &&
window.$$PREBID_GLOBAL$$[object.slotName]) {
ev.source.postMessage(JSON.stringify({
message: PREBID_RESPONSE_MESSAGE,
slotObject: window.$$PREBID_GLOBAL$$[object.slotName]
}), '*');
window.$$PREBID_GLOBAL$$[object.slotName].destroy();
window.$$PREBID_GLOBAL$$[object.slotName] = null;
}
}, false);
} else {
Expand Down

0 comments on commit 0288b76

Please sign in to comment.