Skip to content

Commit

Permalink
Merge pull request #208 from adobecom/stage
Browse files Browse the repository at this point in the history
[Release] Stage to Main
  • Loading branch information
JasonHowellSlavin authored Jun 19, 2024
2 parents d47d376 + 512d0a6 commit 0303383
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ const miloLibs = setLibs(LIBS);
}());

(async function loadPage() {
const { loadArea, loadLana, setConfig, createTag } = await import(`${miloLibs}/utils/utils.js`);
const { loadArea, loadLana, setConfig, createTag, getMetadata } = await import(`${miloLibs}/utils/utils.js`);
if (getMetadata('template') === '404') window.SAMPLE_PAGEVIEWS_AT_RATE = 'high';
const metaCta = document.querySelector('meta[name="chat-cta"]');
if (metaCta && !document.querySelector('.chat-cta')) {
const isMetaCtaDisabled = metaCta?.content === 'off';
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const [setLibs, getLibs] = (() => {
(prodLibs, location) => {
libs = (() => {
const { hostname, search } = location || window.location;
if (!(hostname.includes('.hlx.') || hostname.includes('local'))) return prodLibs;
if (!['.hlx.', '.stage.', 'local'].some((i) => hostname.includes(i))) return prodLibs;
const branch = new URLSearchParams(search).get('milolibs') || 'main';
if (branch === 'local') return 'http://localhost:6456/libs';
return branch.includes('--') ? `https://${branch}.hlx.live/libs` : `https://${branch}--milo--adobecom.hlx.live/libs`;
Expand Down

0 comments on commit 0303383

Please sign in to comment.