Skip to content

Commit d12febc

Browse files
committed
ALDASH-512 Link not leading to download
1 parent 596a2eb commit d12febc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

wp-react-lib/src/util/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const localReplaceLink = (url, locale) => {
1616
if (!pathname.startsWith("/wp/")) {
1717
return url; // Not a WordPress path, leave unchanged
1818
}
19+
//ensuring access to media library files
20+
if (pathname.startsWith("/wp/wp-content")){
21+
return url
22+
}
1923

2024
const afterWp = pathname.slice(3); // remove '/wp'
2125

@@ -38,6 +42,7 @@ export const replaceLink = (url, locale) => {
3842
}
3943

4044
export const replaceHTMLinks = (html, locale) => {
45+
debugger;
4146
//console.log("--------- replaceHTMLinks--------------")
4247
// console.log(process.env.REACT_APP_WP_HOSTS)
4348

0 commit comments

Comments
 (0)