mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fix: subpath
This commit is contained in:
parent
80b020507c
commit
8251c289de
1 changed files with 4 additions and 1 deletions
|
|
@ -76,8 +76,11 @@ class AppComponent extends React.Component {
|
|||
'confirm-invite',
|
||||
];
|
||||
|
||||
const subpath = getSubpath();
|
||||
const subpathArray = subpath ? subpath.split('/').filter((path) => path != '') : [];
|
||||
const pathnames = window.location.pathname.split('/')?.filter((path) => path != '');
|
||||
return pathnames?.length > 0 ? existedPaths.find((path) => pathnames[0] === path) : false;
|
||||
const checkPath = () => existedPaths.find((path) => pathnames[subpath ? subpathArray.length : 0] === path);
|
||||
return pathnames?.length > 0 ? (checkPath() ? true : false) : false;
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue