Skip to content

Commit 3e1aa15

Browse files
Apply suggested fix to Frontend/src/scripts/features/branches.ts from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent aba6f31 commit 3e1aa15

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Frontend/src/scripts/features/branches.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ function renderBranches() {
8585
const kindType = b.kind?.type || '';
8686
const remoteFromName = b.name.includes('/') ? b.name.split('/')[0] : '';
8787
const remote = b.kind?.remote || remoteFromName || '';
88+
const remoteLabel = remote || 'remote';
8889
let kindLabel = '';
8990
if (kindType.toLowerCase() === 'local') kindLabel = '<span class="badge kind">Local</span>';
90-
else if (kindType.toLowerCase() === 'remote') kindLabel = `<span class="badge kind">Remote:${remote || 'remote'}</span>`;
91-
else if (remote) kindLabel = `<span class="badge kind">Remote:${remote || 'remote'}</span>`;
91+
else if (kindType.toLowerCase() === 'remote') kindLabel = `<span class="badge kind">Remote:${remoteLabel}</span>`;
92+
else if (remote) kindLabel = `<span class="badge kind">Remote:${remoteLabel}</span>`;
9293
return `
9394
<li role="option" data-branch="${b.name}" aria-selected="${b.current ? 'true' : 'false'}">
9495
<span class="label">

0 commit comments

Comments
 (0)