File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
apps/desktop/src/components Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 224
224
}
225
225
});
226
226
227
+ // Clear exclusive action if branch cannot be found.
228
+ // TODO: We must be able to express this better..
229
+ $effect (() => {
230
+ if (projectState .exclusiveAction .current && branchesResult .current .data ) {
231
+ ensureValidExclusiveAction ();
232
+ }
233
+ });
234
+
235
+ function ensureValidExclusiveAction() {
236
+ const exclusiveAction = projectState .exclusiveAction .current ;
237
+ const branches = branchesResult .current .data ;
238
+ if (exclusiveAction && branches ) {
239
+ if (' branchName' in exclusiveAction ) {
240
+ const branchName = exclusiveAction .branchName ;
241
+ if (branchName && ! branches .some ((b ) => b .name === branchName )) {
242
+ projectState .exclusiveAction .set (undefined );
243
+ }
244
+ }
245
+ }
246
+ }
247
+
227
248
const startCommitVisible = $derived (uncommittedService .startCommitVisible (stack .id ));
228
249
229
250
function onerror(err : unknown ) {
You can’t perform that action at this time.
0 commit comments