From aecef9a60b1a3abeffa79800812e773a8946b601 Mon Sep 17 00:00:00 2001 From: Robert van Dijk Date: Wed, 28 Feb 2024 21:31:00 +0100 Subject: [PATCH] Fix finding first param --- narrowcast_content/upcoming_activities/static/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/narrowcast_content/upcoming_activities/static/js/index.js b/narrowcast_content/upcoming_activities/static/js/index.js index 49b8190..aadd756 100644 --- a/narrowcast_content/upcoming_activities/static/js/index.js +++ b/narrowcast_content/upcoming_activities/static/js/index.js @@ -1,8 +1,8 @@ // Get the current URL -const currentUrl = window.location.href; +const currentUrl = new URL(window.location.href); // Use URLSearchParams to parse the query parameters -const urlParams = new URLSearchParams(currentUrl); +const urlParams = new URLSearchParams(currentUrl.search); function autoScroll() { var currentIndex = 0;