@schibsted/niche-ads
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -129,2 +129,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
this._subscribeToEvents = (placementConfig, pageType) => { | ||
let executedBackfill = false; | ||
onEvent(APPNEXUS_EVENT_TYPES.adLoaded, placementConfig.targetId, (data) => { | ||
@@ -152,3 +153,4 @@ if (data.source === 'csm') { | ||
this._setPlacement(null, placementConfig); | ||
if (placementConfig.backfill) { | ||
if (placementConfig.backfill && !executedBackfill) { | ||
executedBackfill = true; | ||
const placementTag = this._buildPlacementTag(placementConfig.backfill, pageType); | ||
@@ -155,0 +157,0 @@ defineTag(placementTag); |
{ | ||
"name": "@schibsted/niche-ads", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "Package containing ads logic reappearing across our projects", | ||
@@ -30,3 +30,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "637b12b4fe671f42ea1611886ac259d5a7c6bce5" | ||
"gitHead": "b7773cc2244a07510644244965fd94320ed98281" | ||
} |
@@ -240,2 +240,3 @@ import { script, eventTarget } from '@schibsted/niche-utils'; | ||
private _subscribeToEvents = (placementConfig: PlacementConfig, pageType: PageType) => { | ||
let executedBackfill = false; | ||
onEvent(APPNEXUS_EVENT_TYPES.adLoaded, placementConfig.targetId, (data: AppnexusPlacement) => { | ||
@@ -263,3 +264,4 @@ if (data.source === 'csm') { | ||
this._setPlacement(null, placementConfig); | ||
if (placementConfig.backfill) { | ||
if (placementConfig.backfill && !executedBackfill) { | ||
executedBackfill = true; | ||
const placementTag = this._buildPlacementTag(placementConfig.backfill, pageType); | ||
@@ -266,0 +268,0 @@ defineTag(placementTag); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64668
1360