refactor: await init rundown

This commit is contained in:
Carlos Valente
2024-10-03 23:04:40 +02:00
committed by Carlos Valente
parent 887e5c448e
commit db956f7955
@@ -172,7 +172,7 @@ export async function loadProjectFile(name: string) {
const { rundown, customFields, osc, http } = result.data;
// apply the rundown
initRundown(rundown, customFields);
await initRundown(rundown, customFields);
// apply integrations
oscIntegration.init(osc);
@@ -246,7 +246,7 @@ export async function renameProjectFile(originalFile: string, newFilename: strin
const { rundown, customFields, osc, http } = result.data;
// apply the rundown
initRundown(rundown, customFields);
await initRundown(rundown, customFields);
// apply integrations
oscIntegration.init(osc);
@@ -334,7 +334,7 @@ export async function patchCurrentProject(data: Partial<DatabaseModel>) {
// ... but rundown and custom fields need to be checked
if (rundown != null) {
const result = parseRundown(data);
initRundown(result.rundown, result.customFields);
await initRundown(result.rundown, result.customFields);
}
return newData;