Skip to content

Commit

Permalink
[MWPW-158756] Enhance stage links conversion for cross-domain localiz…
Browse files Browse the repository at this point in the history
…ation (#2913)

* support cross-domain localization on stage links conversion

* Update libs/utils/utils.js

Co-authored-by: Rares Munteanu <[email protected]>

* hotfix

---------

Co-authored-by: Rares Munteanu <[email protected]>
  • Loading branch information
robert-bogos and overmyheadandbody authored Sep 19, 2024
1 parent 549c71f commit 740348c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,7 @@ export function decorateLinks(el) {
decorateImageLinks(el);
const anchors = el.getElementsByTagName('a');
const { hostname } = window.location;
convertStageLinks({ anchors, config, hostname });
return [...anchors].reduce((rdx, a) => {
const links = [...anchors].reduce((rdx, a) => {
appendHtmlToLink(a);
a.href = localizeLink(a.href);
decorateSVG(a);
Expand Down Expand Up @@ -695,6 +694,8 @@ export function decorateLinks(el) {
}
return rdx;
}, []);
convertStageLinks({ anchors, config, hostname });
return links;
}

function decorateContent(el) {
Expand Down

0 comments on commit 740348c

Please sign in to comment.