1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

fix: add location.pathname to location.origin conditionally

This commit is contained in:
2023-03-07 15:37:22 +05:00
parent 2c31922f58
commit edab51c519

View File

@@ -31,7 +31,10 @@ const RunMenu = ({
handleRunBtnClick
}: RunMenuProps) => {
const launchProgram = () => {
const baseUrl = window.location.origin + window.location.pathname
const pathName =
window.location.pathname === '/' ? '' : window.location.pathname
const baseUrl = window.location.origin + pathName
window.open(`${baseUrl}/SASjsApi/stp/execute?_program=${selectedFilePath}`)
}