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

Merge pull request #343 from sasjs/quick-fix

fix: add location.pathname to location.origin conditionally
This commit is contained in:
Allan Bowe
2023-03-07 10:42:07 +00:00
committed by GitHub

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}`)
}