diff --git a/modules/intentIqIdSystem.js b/modules/intentIqIdSystem.js index f51620ab311..a9e8cb33c3b 100644 --- a/modules/intentIqIdSystem.js +++ b/modules/intentIqIdSystem.js @@ -280,11 +280,11 @@ function clearCountersAndStore(allowedStorage, partnerData) { storeCounters(allowedStorage, partnerData); } -function storeCounters(storage, partnerData) { +function storeCounters(allowedStorage, partnerData) { partnerData.callCount = callCount; partnerData.failCount = failCount; partnerData.noDataCounter = noDataCount; - storeData(PARTNER_DATA_KEY, JSON.stringify(partnerData), storage, firstPartyData); + storeData(PARTNER_DATA_KEY, JSON.stringify(partnerData), allowedStorage, firstPartyData); } /** @type {Submodule} */ diff --git a/test/spec/modules/intentIqIdSystem_spec.js b/test/spec/modules/intentIqIdSystem_spec.js index 51e70a20b36..2996f1cbc3a 100644 --- a/test/spec/modules/intentIqIdSystem_spec.js +++ b/test/spec/modules/intentIqIdSystem_spec.js @@ -808,7 +808,7 @@ describe('IntentIQ tests', function () { uspString: null }; - storeData(FIRST_PARTY_KEY, JSON.stringify(FPD), allowedStorage, storage); + storeData(FIRST_PARTY_KEY, JSON.stringify(FPD), allowedStorage, FPD); const callBackSpy = sinon.spy(); const submoduleCallback = intentIqIdSubmodule.getId({ ...allConfigParams, params: { ...allConfigParams.params, partner: newPartnerId } }).callback; submoduleCallback(callBackSpy); @@ -830,7 +830,7 @@ describe('IntentIQ tests', function () { uspString: null }; - storeData(FIRST_PARTY_KEY, JSON.stringify(FPD), allowedStorage, storage); + storeData(FIRST_PARTY_KEY, JSON.stringify(FPD), allowedStorage, FPD); const returnedObject = intentIqIdSubmodule.getId({ ...allConfigParams, params: { ...allConfigParams.params, partner: newPartnerId } }); await waitForClientHints(); expect(returnedObject.callback).to.be.undefined;