Skip to content

Commit

Permalink
[UserId] - ID5 - Fixed case when consentData is undefined (No CMP) (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
padurgeat authored and harpere committed Sep 20, 2019
1 parent 1e03b4b commit f1642f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/id5IdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const id5IdSubmodule = {
utils.logError(`User ID - ID5 submodule requires partner to be defined as a number`);
return undefined;
}
const hasGdpr = (typeof consentData.gdprApplies === 'boolean' && consentData.gdprApplies) ? 1 : 0;
const hasGdpr = (consentData && typeof consentData.gdprApplies === 'boolean' && consentData.gdprApplies) ? 1 : 0;
const gdprConsentString = hasGdpr ? consentData.consentString : '';
const storedUserId = this.decode(cacheIdObj);
const url = `https://id5-sync.com/g/v1/${configParams.partner}.json?1puid=${storedUserId ? storedUserId.id5id : ''}&gdpr=${hasGdpr}&gdpr_consent=${gdprConsentString}`;
Expand Down
2 changes: 1 addition & 1 deletion modules/userId/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @summary performs action to obtain id and return a value in the callback's response argument
* @name Submodule#getId
* @param {SubmoduleParams} configParams
* @param {ConsentData} consentData
* @param {ConsentData|undefined} consentData
* @param {(Object|undefined)} cacheIdObj
* @return {(Object|function)} id data or a callback, the callback is called on the auction end event
*/
Expand Down

0 comments on commit f1642f1

Please sign in to comment.