api-viewer: trim trailing slashes and spaces from tree-path url

as else the store.findNode(...) works on "/access" but not
"/access/", which some browser auto-complete to.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-12-11 14:38:58 +01:00
parent ab918a4fc7
commit 78bcda1de1

View File

@ -458,7 +458,7 @@ Ext.onReady(function() {
}); });
var deepLink = function() { var deepLink = function() {
var path = window.location.hash.substring(1); var path = window.location.hash.substring(1).replace(/\/\s*$/, '')
var endpoint = store.findNode('path', path); var endpoint = store.findNode('path', path);
if (endpoint) { if (endpoint) {