diff --git a/src/dashboard/Data/Browser/Browser.react.js b/src/dashboard/Data/Browser/Browser.react.js index 55c3603791..ad5ec9238b 100644 --- a/src/dashboard/Data/Browser/Browser.react.js +++ b/src/dashboard/Data/Browser/Browser.react.js @@ -1030,7 +1030,7 @@ class Browser extends DashboardView { }, ]); window.open( - generatePath(this.context, `browser/${className}?filters=${encodeURIComponent(filters)}`), + generatePath(this.context, `browser/${className}?filters=${encodeURIComponent(filters)}`, true), '_blank' ); } diff --git a/src/lib/generatePath.js b/src/lib/generatePath.js index f01c14f891..208245f1da 100644 --- a/src/lib/generatePath.js +++ b/src/lib/generatePath.js @@ -1,3 +1,8 @@ -export default function generatePath(currentApp, path) { +const MOUNT_PATH = window.PARSE_DASHBOARD_PATH; + +export default function generatePath(currentApp, path, prependMountPath = false) { + if (prependMountPath && MOUNT_PATH) { + return `${MOUNT_PATH}apps/${currentApp.slug}/${path}`; + } return `/apps/${currentApp.slug}/${path}`; }