From f51d736df30b18d05669e934ac277a044d3e00b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Fri, 11 Apr 2025 12:23:59 +0200 Subject: [PATCH] pl-fe: do not drop search params when opening modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-fe/src/components/modal-root.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/components/modal-root.tsx b/packages/pl-fe/src/components/modal-root.tsx index be0eb10fc..c3217fc4c 100644 --- a/packages/pl-fe/src/components/modal-root.tsx +++ b/packages/pl-fe/src/components/modal-root.tsx @@ -139,9 +139,9 @@ const ModalRoot: React.FC = ({ children, onCancel, onClose, type }) }; const ensureHistoryBuffer = () => { - const { pathname, state } = history.location; + const { state } = history.location; if (!state || (state as any).plFeModalKey !== modalHistoryKey.current) { - history.push(pathname, { ...(state as any), plFeModalKey: modalHistoryKey.current }); + history.push(history.location, { ...(state as any), plFeModalKey: modalHistoryKey.current }); } };