From c6c1f261e3c95d53e4076775104e40a00ad28e2e Mon Sep 17 00:00:00 2001 From: ffont Date: Thu, 16 Jan 2025 10:26:10 +0100 Subject: [PATCH] Fix failing paginated modal links --- freesound/static/bw-frontend/src/components/modal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freesound/static/bw-frontend/src/components/modal.js b/freesound/static/bw-frontend/src/components/modal.js index 4bc2c472d..ddaabb37b 100644 --- a/freesound/static/bw-frontend/src/components/modal.js +++ b/freesound/static/bw-frontend/src/components/modal.js @@ -85,7 +85,10 @@ const bindConfirmationModalElements = (container) => { // Logic to bind default modals -const handleDefaultModal = (modalUrl, modalActivationParam, element) => { +const handleDefaultModal = (modalUrl, modalActivationParam, atPage) => { + if ((atPage !== undefined) && modalUrl.indexOf('&page') == -1){ + modalUrl += '&page=' + atPage; + } handleGenericModal(modalUrl, undefined, undefined, true, true, modalActivationParam); }