summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/groups
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 18:06:20 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 18:06:20 +0000
commit2abb1b54c0305b359b178d6660810e865f619c22 (patch)
treee388953a0566ef9844b0b98cdb34236049721a14 /app/assets/javascripts/pages/groups
parent8320f7956d72986f5a7c850874fce4f8b5a8e015 (diff)
downloadgitlab-ce-2abb1b54c0305b359b178d6660810e865f619c22.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages/groups')
-rw-r--r--app/assets/javascripts/pages/groups/shared/group_details.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/pages/groups/shared/group_details.js b/app/assets/javascripts/pages/groups/shared/group_details.js
index 01ef3f1db2b..37b253d7c48 100644
--- a/app/assets/javascripts/pages/groups/shared/group_details.js
+++ b/app/assets/javascripts/pages/groups/shared/group_details.js
@@ -1,6 +1,6 @@
/* eslint-disable no-new */
-import { getPagePath } from '~/lib/utils/common_utils';
+import { getPagePath, getDashPath } from '~/lib/utils/common_utils';
import { ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED } from '~/groups/constants';
import NewGroupChild from '~/groups/new_group_child';
import notificationsDropdown from '~/notifications_dropdown';
@@ -12,9 +12,8 @@ import GroupTabs from './group_tabs';
export default function initGroupDetails(actionName = 'show') {
const newGroupChildWrapper = document.querySelector('.js-new-project-subgroup');
const loadableActions = [ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED];
- const paths = window.location.pathname.split('/');
- const subpath = paths[paths.length - 1];
- let action = loadableActions.includes(subpath) ? subpath : getPagePath(1);
+ const dashPath = getDashPath();
+ let action = loadableActions.includes(dashPath) ? dashPath : getPagePath(1);
if (actionName && action === actionName) {
action = 'show'; // 'show' resets GroupTabs to default action through base class
}