diff --git a/assets/js/dashboard/stats/modals/locations-modal.js b/assets/js/dashboard/stats/modals/locations-modal.js index 75373924c6b7..7c0f80d60662 100644 --- a/assets/js/dashboard/stats/modals/locations-modal.js +++ b/assets/js/dashboard/stats/modals/locations-modal.js @@ -23,7 +23,7 @@ function LocationsModal({ location }) { const currentView = urlParts[urlParts.length - 1] let reportInfo = VIEWS[currentView] - reportInfo.endpoint = url.apiPath(site, reportInfo.endpoint) + reportInfo = {...reportInfo, endpoint: url.apiPath(site, reportInfo.endpoint)} const getFilterInfo = useCallback((listItem) => { return { diff --git a/assets/js/dashboard/stats/modals/sources.js b/assets/js/dashboard/stats/modals/sources.js index 85b4f1bcef7f..1d8b45afd7fa 100644 --- a/assets/js/dashboard/stats/modals/sources.js +++ b/assets/js/dashboard/stats/modals/sources.js @@ -47,7 +47,7 @@ function SourcesModal({ location }) { const currentView = urlParts[urlParts.length - 1] let reportInfo = VIEWS[currentView].info - reportInfo.endpoint = url.apiPath(site, reportInfo.endpoint) + reportInfo = {...reportInfo, endpoint: url.apiPath(site, reportInfo.endpoint)} const getFilterInfo = useCallback((listItem) => { return {