fix: allow empty string as a cue value

This commit is contained in:
Carlos Valente
2025-07-24 07:44:52 +02:00
committed by Carlos Valente
parent 6ffe34a642
commit 1e63238cac
@@ -9,7 +9,6 @@ import {
isOntimeEvent,
OntimeBlock,
OntimeEntry,
OntimeEvent,
PatchWithId,
RefetchKey,
Rundown,
@@ -101,11 +100,6 @@ export async function editEntry(patch: PatchWithId): Promise<OntimeEntry> {
throw new Error('Entry not found');
}
// we dont allow the user to change the cue to empty string
if ((patch as Partial<OntimeEvent>)?.cue === '') {
throw new Error('Cue value invalid');
}
// we cannot allow patching to a different type
if (patch?.type && currentEntry.type !== patch.type) {
throw new Error('Invalid event type');