fix: public apps are not loading (#8247)

This commit is contained in:
Muhsin Shah C P 2023-12-06 17:29:38 +05:30 committed by GitHub
parent 839bca2c25
commit 3734e6fc00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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('/');