Skip to content

Commit aa952b8

Browse files
committed
feat: ensure all files in project are inactive when app loaded
1 parent 0559e8b commit aa952b8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/projectmanager.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,18 @@ class ProjectManager {
285285

286286
#loadFromStorage() {
287287
const data = localStorage.getItem('current_project');
288-
return data ? JSON.parse(data) : null;
288+
if (data) {
289+
const project = JSON.parse(data);
290+
291+
if (project && project.resources) {
292+
project.resources.forEach((resource) => {
293+
resource.isActive = false;
294+
});
295+
}
296+
297+
return project;
298+
}
299+
return null;
289300
}
290301

291302
#saveToStorage() {

0 commit comments

Comments
 (0)