From 7f390d0c00c0a0feda5c16a5c26b8e3ee0e95609 Mon Sep 17 00:00:00 2001 From: arunvjn <32433245+arunvjn@users.noreply.github.com> Date: Thu, 31 Mar 2022 13:21:20 +0530 Subject: [PATCH] fix: Incorrect page list in deployed branches (#12416) --- app/client/src/api/ApiUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/client/src/api/ApiUtils.ts b/app/client/src/api/ApiUtils.ts index a27a4dffbe..5a9482ab43 100644 --- a/app/client/src/api/ApiUtils.ts +++ b/app/client/src/api/ApiUtils.ts @@ -16,6 +16,7 @@ import store from "store"; import { logoutUser } from "actions/userActions"; import { AUTH_LOGIN_URL } from "constants/routes"; import { getCurrentGitBranch } from "selectors/gitSyncSelectors"; +import getQueryParamsObject from "utils/getQueryParamsObject"; const executeActionRegex = /actions\/execute/; const timeoutErrorRegex = /timeout of (\d+)ms exceeded/; @@ -38,11 +39,11 @@ const is404orAuthPath = () => { // this will be used to calculate the time taken for an action // execution request export const apiRequestInterceptor = (config: AxiosRequestConfig) => { - const branch = getCurrentGitBranch(store.getState()); + const branch = + getCurrentGitBranch(store.getState()) || getQueryParamsObject().branch; if (branch) { config.headers.branchName = branch; } - if (config.url?.indexOf("/git/") !== -1) { config.timeout = 1000 * 120; // increase timeout for git specific APIs }