We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28d2033 commit b07f924Copy full SHA for b07f924
1 file changed
src/scripts/Modules/UI.js
@@ -150,9 +150,9 @@ export default class UI {
150
if (confirm(`Are you sure you want to delete the project "${projectName}"?`)) {
151
this.app.removeProject(projectName);
152
console.log(`${projectName} deleted`);
153
- // If the deleted project was the selected one, select the default project
+ // If the deleted project was the selected one, select the first available project
154
if (this.selectedProject === projectName) {
155
- this.selectedProject = 'Default'; // Or the first available project
+ this.selectedProject = this.app.listProjects()[0] || 'Add a Project';
156
}
157
this.loadProjects(); // Refresh the project list
158
this.OpenProject(this.selectedProject);
0 commit comments