mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
refactor: add guards around trivial index checks
This commit is contained in:
committed by
Carlos Valente
parent
242cefd35c
commit
426d42ab63
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user