fix: getBaseUrl() returns correct module prefix for /dashboard_for_sage path
This commit is contained in:
parent
1a3412176d
commit
b83131146a
@ -9,9 +9,9 @@
|
||||
// Derive base URL from current page (e.g. /dashboard_for_sage/index.ui -> /dashboard_for_sage)
|
||||
function getBaseUrl() {
|
||||
var path = window.location.pathname;
|
||||
// Remove .ui or .dspy extension
|
||||
var idx = path.lastIndexOf('/');
|
||||
return path.substring(0, idx);
|
||||
// path is like /dashboard_for_sage/index.ui or /dashboard_for_sage
|
||||
var parts = path.split('/').filter(function(p) { return p; });
|
||||
return '/' + parts[0];
|
||||
}
|
||||
|
||||
function buildUrl(dspyFile) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user