From b6d43bf77ca731fd211e967f378bec63196f3f8e Mon Sep 17 00:00:00 2001 From: Tristan Gueguen Date: Tue, 5 Nov 2024 16:40:29 +0100 Subject: [PATCH] fix(scroll): don't scroll on regulations page if there is a search --- web/common/hooks/useScroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/common/hooks/useScroll.js b/web/common/hooks/useScroll.js index 55e4d3f1..c2260e85 100644 --- a/web/common/hooks/useScroll.js +++ b/web/common/hooks/useScroll.js @@ -12,7 +12,7 @@ function useScroll() { } return; } - if (pathname === "/resources/regulations" || search !== "") { + if (pathname === "/resources/regulations" && search !== "") { return; } const mainElements = document.getElementsByTagName("main");