Skip to content

Commit 61c3a23

Browse files
committed
Replace return statements with breaks in commit file selection loop to prevent premature exit
- after confirming file selection, the list of all commits should be re-opened with the last-used being highlighted - even if no files of a commit were chosen, should still reopen the list of commits └── apps └── editor └── src └── commands └── select-commit-files-command.ts
1 parent bbc5808 commit 61c3a23

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎apps/editor/src/commands/select-commit-files-command.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,11 @@ export const select_commit_files_command = (
302302

303303
selected_paths = search_result.selected_paths
304304
} else {
305-
if (selected_files.length == 0) {
306-
return
307-
}
308305
selected_paths = selected_files.map((item) => item.file_path)
309306
}
310307

311308
if (selected_paths.length == 0) {
312-
return
309+
break
313310
}
314311

315312
if (currently_checked.length > 0) {
@@ -322,7 +319,7 @@ export const select_commit_files_command = (
322319
vscode.window.showInformationMessage(
323320
dictionary.information_message.CONTEXT_ALREADY_SET
324321
)
325-
return
322+
break
326323
}
327324
}
328325

@@ -337,7 +334,8 @@ export const select_commit_files_command = (
337334
paths_to_apply.length
338335
)
339336
)
340-
return
337+
338+
break
341339
}
342340
}
343341
} catch (error) {

0 commit comments

Comments
 (0)