Skip to content

Commit

Permalink
fix: add location.pathname to location.origin conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
sabhas committed Mar 7, 2023
1 parent 2c31922 commit edab51c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/containers/Studio/internal/components/runMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}

Expand Down

0 comments on commit edab51c

Please sign in to comment.