api-viewer: ensure path starts with slash
should always be the case, but this is now an assumption, so better to ensure it. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6cc360f2b4
commit
f0de3268af
@ -115,6 +115,9 @@ Ext.onReady(function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let real_path = function(path) {
|
let real_path = function(path) {
|
||||||
|
if (!path.match(/^[/]/)) {
|
||||||
|
path = `/${path}`;
|
||||||
|
}
|
||||||
return path.replace(/^.*\/_upgrade_(\/)?/, "/");
|
return path.replace(/^.*\/_upgrade_(\/)?/, "/");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user