From 5e02617cf360fc3babee3d9aa70300008437b87e Mon Sep 17 00:00:00 2001 From: Hiroshi Tanaka Date: Wed, 2 Feb 2022 14:56:55 +0900 Subject: [PATCH] Fix to disable object reference. --- modules/fluctAnalyticsAdapter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/fluctAnalyticsAdapter.js b/modules/fluctAnalyticsAdapter.js index ef6f0b6d99f..35016567b2d 100644 --- a/modules/fluctAnalyticsAdapter.js +++ b/modules/fluctAnalyticsAdapter.js @@ -7,6 +7,7 @@ import CONSTANTS from '../src/constants.json'; import { logInfo, generateUUID, + deepClone, } from '../src/utils.js'; import find from 'core-js-pure/features/array/find.js'; @@ -126,7 +127,8 @@ const getAdUnitMap = () => window.googletag.pubads().getSlots().reduce((prev, sl /** @type {(adUnits: AdUnit[], slots: Slots) => AdUnit[]} */ export const convertReplicatedAdUnits = (adUnits, slots) => - adUnits.map(adUnit => { + adUnits.map(_adUnit => { + const adUnit = deepClone(_adUnit) const adUnitPath = slots[adUnit.code] try { if (adUnitPath) {