mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-25 18:49:11 +03:00
Eagerly redirect to workspace
This commit is contained in:
parent
9593904fa7
commit
e0bdfc425a
@ -31,19 +31,19 @@
|
|||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (branchListing) {
|
if (branchListing) {
|
||||||
|
if (branchListing.virtualBranch?.inWorkspace) {
|
||||||
|
goto(`/${project.id}/board`);
|
||||||
|
}
|
||||||
|
|
||||||
const branchesWithGivenName: Branch[] | undefined = branchesByGivenName[branchListing.name];
|
const branchesWithGivenName: Branch[] | undefined = branchesByGivenName[branchListing.name];
|
||||||
|
|
||||||
if (branchesWithGivenName === undefined) {
|
if (branchesWithGivenName) {
|
||||||
if (branchListing.virtualBranch) {
|
|
||||||
goto(`/${project.id}/board`);
|
|
||||||
} else {
|
|
||||||
error('Failed to find branch');
|
|
||||||
goto(`/${project.id}/board`);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
localBranch = branchesWithGivenName.find((branch) => !branch.isRemote);
|
localBranch = branchesWithGivenName.find((branch) => !branch.isRemote);
|
||||||
|
|
||||||
remoteBranches = branchesWithGivenName.filter((branch) => branch.isRemote);
|
remoteBranches = branchesWithGivenName.filter((branch) => branch.isRemote);
|
||||||
|
} else {
|
||||||
|
error('Failed to find branch');
|
||||||
|
goto(`/${project.id}/board`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user