Skip to content

Commit

Permalink
default-branch-button - Don't show on the default branch (#7062)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Nov 15, 2023
1 parent cf847ea commit ad13227
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/github-helpers/is-default-branch.ts
Expand Up @@ -24,5 +24,5 @@ export default async function isDefaultBranch(): Promise<boolean> {
// defaultBranch === 'a/b' && currentBranch === 'a'
const path = parts.join('/');
const defaultBranch = await getDefaultBranch();
return path === defaultBranch || defaultBranch.startsWith(`${path}/`);
return path === defaultBranch || path.startsWith(`${defaultBranch}/`);
}

0 comments on commit ad13227

Please sign in to comment.