Skip to content

Commit

Permalink
Accounting for stage, parity with main
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonHowellSlavin committed Jun 26, 2024
1 parent f51b0bd commit 24439c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const loadStyle = (path) => {
// eslint-disable-next-line import/prefer-default-export
export const LIBS = (() => {
const { hostname, search } = window.location;
if (!(hostname.includes('.hlx.') || hostname.includes('local'))) return LIBS;
if (!['.hlx.', '.stage.', 'local'].some((i) => hostname.includes(i))) return '/libs';
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 24439c2

Please sign in to comment.