From eef397ee3c405ca75645b04668f8d67cebd981e8 Mon Sep 17 00:00:00 2001 From: Scott Menzer Date: Mon, 9 Nov 2020 18:55:06 +0100 Subject: [PATCH] call domainOverride only when needed in the module, not ahead of time when the module is registered. --- modules/pubCommonIdSystem.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/pubCommonIdSystem.js b/modules/pubCommonIdSystem.js index cd0dede9dd2..919e735d34e 100644 --- a/modules/pubCommonIdSystem.js +++ b/modules/pubCommonIdSystem.js @@ -37,7 +37,7 @@ function storeData(config, value) { if (config.storage.type === COOKIE) { if (storage.cookiesAreEnabled()) { - storage.setCookie(key, value, expiresStr, 'LAX', COOKIE_DOMAIN); + storage.setCookie(key, value, expiresStr, 'LAX', pubCommonIdSubmodule.domainOverride()); } } else if (config.storage.type === LOCAL_STORAGE) { if (storage.hasLocalStorage()) { @@ -305,6 +305,4 @@ export const pubCommonIdSubmodule = { } }; -const COOKIE_DOMAIN = pubCommonIdSubmodule.domainOverride(); - submodule('userId', pubCommonIdSubmodule);