diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 18:09:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 18:09:40 +0300 |
commit | f1357e5566b2c1f4f5e7b933b72a2d24431905e9 (patch) | |
tree | 058422b7532ed76b6363033a8dd4dd8272cd7c68 /app/assets/javascripts/lib | |
parent | 377d420e3d7e3f066c409714cbb9f7bb0a4882b6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index 8fab27966c6..4ce63d518a6 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -28,16 +28,12 @@ export const checkPageAndAction = (page, action) => { export const isInIncidentPage = () => checkPageAndAction('incidents', 'show'); export const isInIssuePage = () => checkPageAndAction('issues', 'show'); export const isInDesignPage = () => checkPageAndAction('issues', 'designs'); -export const isInMRPage = () => checkPageAndAction('merge_requests', 'show'); +export const isInMRPage = () => + checkPageAndAction('merge_requests', 'show') || checkPageAndAction('merge_requests', 'diffs'); export const isInEpicPage = () => checkPageAndAction('epics', 'show'); export const getDashPath = (path = window.location.pathname) => path.split('/-/')[1] || null; -export const getCspNonceValue = () => { - const metaTag = document.querySelector('meta[name=csp-nonce]'); - return metaTag && metaTag.content; -}; - export const rstrip = (val) => { if (val) { return val.replace(/\s+$/, ''); |