Skip to content

Commit

Permalink
fix: fallback on missing branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Feb 8, 2025
1 parent e35285d commit 220b0b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/main/MainScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
versionState.branches = branchesData.branches.sort((a, b) =>
(a === branchesData.defaultBranch ? -1 : b === branchesData.defaultBranch ? 1 : 0));
if (!options.version.branchName) {
if (!options.version.branchName || !versionState.branches.includes(options.version.branchName)) {
options.version.branchName = branchesData.defaultBranch;
await options.store();
}
Expand Down

0 comments on commit 220b0b9

Please sign in to comment.