Skip to content

Commit

Permalink
call domainOverride only when needed in the module, not ahead of time…
Browse files Browse the repository at this point in the history
… when the module is registered.
  • Loading branch information
smenzer committed Nov 9, 2020
1 parent 956fe2b commit eef397e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/pubCommonIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -305,6 +305,4 @@ export const pubCommonIdSubmodule = {
}
};

const COOKIE_DOMAIN = pubCommonIdSubmodule.domainOverride();

submodule('userId', pubCommonIdSubmodule);

0 comments on commit eef397e

Please sign in to comment.