Skip to content

Commit b07f924

Browse files
committed
fix: issue with deleting selected project
1 parent 28d2033 commit b07f924

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/scripts/Modules/UI.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ export default class UI {
150150
if (confirm(`Are you sure you want to delete the project "${projectName}"?`)) {
151151
this.app.removeProject(projectName);
152152
console.log(`${projectName} deleted`);
153-
// If the deleted project was the selected one, select the default project
153+
// If the deleted project was the selected one, select the first available project
154154
if (this.selectedProject === projectName) {
155-
this.selectedProject = 'Default'; // Or the first available project
155+
this.selectedProject = this.app.listProjects()[0] || 'Add a Project';
156156
}
157157
this.loadProjects(); // Refresh the project list
158158
this.OpenProject(this.selectedProject);

0 commit comments

Comments
 (0)