Skip to content

Commit

Permalink
Line fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bandana147 committed Jul 23, 2024
1 parent dc759cc commit 81321b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions libs/navigation/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ const envMap = {

export default async function loadBlock(configs = {}) {
const { locale, contentRoot, env = 'prod' } = configs;
let miloLibs = envMap[env];
const branch = new URLSearchParams(window.location.search).get('navbranch');
if (branch) {
miloLibs = `https://${branch}--milo--adobecom.hlx.page`;
}
const miloLibs = branch ? `https://${branch}--milo--adobecom.hlx.page` : envMap[env];

// Relative path can't be used, as the script will run on consumer's app
const { default: bootstrapBlock } = await import(`${miloLibs}/libs/navigation/bootstrapper.js`);
Expand Down
4 changes: 2 additions & 2 deletions libs/utils/federated.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export const getFederatedContentRoot = () => {
];
const { allowedOrigins = [], origin: configOrigin } = getConfig();
if (federatedContentRoot) return federatedContentRoot;
//Non milo consumers will have its origin from congig
// Non milo consumers will have its origin from congig
const origin = configOrigin || window.location;

federatedContentRoot = [...allowedOrigins, ...cdnWhitelistedOrigins].some((o) => origin.replace('.stage', '') === o)
? origin
: 'https://www.adobe.com';
Expand Down

0 comments on commit 81321b3

Please sign in to comment.