Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ALDASH-512 Link not leading to download
  • Loading branch information
sdimunzio committed Dec 10, 2025
commit d12febc112b767836e8d7f7e9bab3588c3638f1e
5 changes: 5 additions & 0 deletions wp-react-lib/src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const localReplaceLink = (url, locale) => {
if (!pathname.startsWith("/wp/")) {
return url; // Not a WordPress path, leave unchanged
}
//ensuring access to media library files
if (pathname.startsWith("/wp/wp-content")){
return url
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at the end of the return statement. While JavaScript has automatic semicolon insertion, this is inconsistent with the style used elsewhere in the file (e.g., line 17).

Suggested change
return url
return url;

Copilot uses AI. Check for mistakes.
}

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

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

export const replaceHTMLinks = (html, locale) => {
debugger;
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debugger statement should be removed before merging to production. This will cause the browser to pause execution in development tools, which is not intended for production code.

Suggested change
debugger;

Copilot uses AI. Check for mistakes.
//console.log("--------- replaceHTMLinks--------------")
// console.log(process.env.REACT_APP_WP_HOSTS)

Expand Down