mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-03 18:50:30 +08:00
Default default branch not being found
We default to the first branch. Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -144,13 +144,16 @@
|
||||
bind:peersDropdown={dropdownState.peer}
|
||||
on:peerChanged={(event) => updatePeer(event.detail)} />
|
||||
{/if}
|
||||
|
||||
<BranchSelector {branches} {project} {revision} {toggleDropdown}
|
||||
bind:branchesDropdown={dropdownState.branch}
|
||||
on:branchChanged={(event) => updateRevision(event.detail)} />
|
||||
|
||||
<div class="anchor">
|
||||
<AnchorBadge {commit} {anchors}
|
||||
head={project.head} on:click={(event) => updateRevision(event.detail)} />
|
||||
</div>
|
||||
|
||||
{#if seed.git.host}
|
||||
<span>
|
||||
<div class="clone" on:click={() => toggleDropdown("clone")}>
|
||||
|
||||
@@ -29,8 +29,13 @@
|
||||
if (revision) browse.revision = revision;
|
||||
} else if (revision) {
|
||||
browse.revision = revision;
|
||||
} else {
|
||||
} else if (head) {
|
||||
browse.revision = head;
|
||||
} else {
|
||||
const branchNames = Object.keys(project.branches);
|
||||
const firstBranch = branchNames.length >= 1 ? branchNames[0] : null;
|
||||
|
||||
browse.revision = firstBranch;
|
||||
}
|
||||
|
||||
$: proj.browse({ ...browse, peer });
|
||||
|
||||
Reference in New Issue
Block a user