From 3734e6fc00c3b8f25dec201540d25812d4e2b060 Mon Sep 17 00:00:00 2001 From: Muhsin Shah C P Date: Wed, 6 Dec 2023 17:29:38 +0530 Subject: [PATCH] fix: public apps are not loading (#8247) --- frontend/src/_helpers/routes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/_helpers/routes.js b/frontend/src/_helpers/routes.js index 183f83a51b..e8611d46ea 100644 --- a/frontend/src/_helpers/routes.js +++ b/frontend/src/_helpers/routes.js @@ -120,8 +120,9 @@ export const getWorkspaceIdOrSlugFromURL = () => { }; export const excludeWorkspaceIdFromURL = (pathname) => { - if (!['/integrations', '/applications/', '/switch-workspace'].find((path) => pathname.startsWith(path))) { - pathname = getSubpath() ? pathname.replace(getSubpath(), '') : pathname; + const tempPathname = getSubpath() ? pathname.replace(getSubpath(), '') : pathname; + if (!['/integrations', '/applications/', '/switch-workspace'].find((path) => tempPathname.startsWith(path))) { + pathname = tempPathname; const paths = pathname?.split('/').filter((path) => path !== ''); paths.shift(); const newPath = paths.join('/');