refactor: add guards around trivial index checks

This commit is contained in:
Carlos Valente
2025-12-11 17:59:46 +01:00
committed by Carlos Valente
parent 242cefd35c
commit 426d42ab63
7 changed files with 35 additions and 8 deletions
@@ -94,6 +94,10 @@ async function loadProject(projectData: DatabaseModel, fileName: string, rundown
? projectData.rundowns[rundownId]
: getFirstRundown(projectData.rundowns);
if (!rundown) {
throw new Error('No rundown found in project');
}
await initRundown(rundown, projectData.customFields, true);
// persist the project selection