From 05fbf379263283b312bb54ce5e982032d3a47632 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Wed, 1 Feb 2023 17:03:21 +0100 Subject: [PATCH] Fix test environment with `?test=1` (#2475) --- src/hooks/useHistoryBack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useHistoryBack.ts b/src/hooks/useHistoryBack.ts index bbbcb58cb..381691ed5 100644 --- a/src/hooks/useHistoryBack.ts +++ b/src/hooks/useHistoryBack.ts @@ -6,7 +6,7 @@ import { IS_IOS } from '../util/environment'; import { getActions } from '../lib/teact/teactn'; export const LOCATION_HASH = window.location.hash; -const PATH_BASE = window.location.pathname; +const PATH_BASE = `${window.location.pathname}${window.location.search}`; // Carefully selected by swiping and observing visual changes // TODO: may be different on other devices such as iPad, maybe take dpi into account? const SAFARI_EDGE_BACK_GESTURE_LIMIT = 300;