From 92a249c94764383045d589b449da8b9bc14e37f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 25 Jan 2022 13:20:50 -0500 Subject: [PATCH] fix: #10197, fix relative path urls for dashboard pages --- public/src/admin/modules/dashboard-line-graph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/admin/modules/dashboard-line-graph.js b/public/src/admin/modules/dashboard-line-graph.js index 38f75e62cc..1e11b82e5b 100644 --- a/public/src/admin/modules/dashboard-line-graph.js +++ b/public/src/admin/modules/dashboard-line-graph.js @@ -182,7 +182,8 @@ define('admin/modules/dashboard-line-graph', ['Chart', 'translator', 'benchpress count: amount, }); apiEl.attr('href', `${config.relative_path}/api/v3/admin/analytics/${ajaxify.data.set}?${newHref}`); - ajaxify.updateHistory(`${ajaxify.data.url.slice(1)}?${newHref}`, true); + const url = ajaxify.removeRelativePath(ajaxify.data.url.slice(1)); + ajaxify.updateHistory(`${url}?${newHref}`, true); hooks.fire('action:admin.dashboard.updateGraph', { graph: Graph._current, });