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)
|
// Derive base URL from current page (e.g. /dashboard_for_sage/index.ui -> /dashboard_for_sage)
|
||||||
function getBaseUrl() {
|
function getBaseUrl() {
|
||||||
var path = window.location.pathname;
|
var path = window.location.pathname;
|
||||||
// Remove .ui or .dspy extension
|
// path is like /dashboard_for_sage/index.ui or /dashboard_for_sage
|
||||||
var idx = path.lastIndexOf('/');
|
var parts = path.split('/').filter(function(p) { return p; });
|
||||||
return path.substring(0, idx);
|
return '/' + parts[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildUrl(dspyFile) {
|
function buildUrl(dspyFile) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user