Skip to content

Commit

Permalink
Merge pull request #343 from sasjs/quick-fix
Browse files Browse the repository at this point in the history
fix: add location.pathname to location.origin conditionally
  • Loading branch information
allanbowe authored Mar 7, 2023
2 parents 081cc31 + edab51c commit e607115
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 e607115

Please sign in to comment.