Skip to content

Commit

Permalink
MWPW-158407, 158404, 158406, 158408, 158461: Ignoring decorateMeta if…
Browse files Browse the repository at this point in the history
… the metadata is from promo. (#2924)

* Ignoring decorateMeta if the metadata is from promo.

* nit: combine two if statement as OR.

* added ? to avoid js error
  • Loading branch information
seanchoi-dev authored Oct 1, 2024
1 parent 067f609 commit 6cdc02a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ function decorateMeta() {
const { origin } = window.location;
const contents = document.head.querySelectorAll(`[content*=".${SLD}."]`);
contents.forEach((meta) => {
if (meta.getAttribute('property') === 'hlx:proxyUrl') return;
if (meta.getAttribute('property') === 'hlx:proxyUrl' || meta.getAttribute('name')?.endsWith('schedule')) return;
try {
const url = new URL(meta.content);
const localizedLink = localizeLink(`${origin}${url.pathname}`);
Expand Down

0 comments on commit 6cdc02a

Please sign in to comment.