From 78bcda1de1167efba5cca2ccdc133d689bea9b3c Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 11 Dec 2019 14:38:58 +0100 Subject: [PATCH] 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 --- api-viewer/PVEAPI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-viewer/PVEAPI.js b/api-viewer/PVEAPI.js index 9a14156..eac5bc7 100644 --- a/api-viewer/PVEAPI.js +++ b/api-viewer/PVEAPI.js @@ -458,7 +458,7 @@ Ext.onReady(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); if (endpoint) {