diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 18:06:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 18:06:20 +0000 |
commit | 2abb1b54c0305b359b178d6660810e865f619c22 (patch) | |
tree | e388953a0566ef9844b0b98cdb34236049721a14 /app/assets/javascripts/lib/utils/common_utils.js | |
parent | 8320f7956d72986f5a7c850874fce4f8b5a8e015 (diff) | |
download | gitlab-ce-2abb1b54c0305b359b178d6660810e865f619c22.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib/utils/common_utils.js')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index 6e8f63a10a4..7c4373ba517 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -15,6 +15,8 @@ export const getPagePath = (index = 0) => { return page.split(':')[index]; }; +export const getDashPath = (path = window.location.pathname) => path.split('/-/')[1] || null; + export const isInGroupsPage = () => getPagePath() === 'groups'; export const isInProjectPage = () => getPagePath() === 'projects'; |