Document `getProjectSlug`
Understand and document why getProjectSlug needs to verify it's on project page.
export const getProjectSlug = () => {
if (isInProjectPage()) {
return $('body').data('project');
}
return null;
};
window.gl.utils.getProjectSlug = getProjectSlug;
The following discussion from gitlab-ce!14074 should be addressed:
-
@iamphill started a discussion: (+1 comment) Why do we need the
ifaround this one & the group one?