Skip to content

Commit

Permalink
Fix GitLab project name with new navigation enabled (sourcegraph#53532)
Browse files Browse the repository at this point in the history
Fixes the `getPageInfo` throwing a `Unable to determine project name` error when the new navigation is enabled.
  • Loading branch information
iamphill authored Aug 30, 2023
1 parent 9139f5d commit ee4f6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/browser/src/shared/code-hosts/gitlab/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const getPageKindFromPathName = (owner: string, projectName: string, path
* Gets information about the page.
*/
export function getPageInfo(): GitLabInfo {
const projectLink = document.querySelector<HTMLAnchorElement>('.context-header a')
const projectLink = document.querySelector<HTMLAnchorElement>('.context-header a, .shortcuts-project')
if (!projectLink) {
throw new Error('Unable to determine project name')
}
Expand Down

0 comments on commit ee4f6d6

Please sign in to comment.