mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 00:43:54 +00:00
Fix: link events in sheet when there is nothing to link (#1053)
* create failing tests * fix missing optional chaining
This commit is contained in:
committed by
GitHub
parent
c2fa115946
commit
0e32b3a3af
@@ -49,8 +49,8 @@ export const parseRundown = (data: Partial<DatabaseModel>): OntimeRundown => {
|
||||
|
||||
if (isOntimeEvent(event)) {
|
||||
if (event.linkStart) {
|
||||
const prevEvent = getLastEvent(rundown).lastEvent;
|
||||
event.linkStart = prevEvent.id;
|
||||
const prevId = getLastEvent(rundown).lastEvent?.id ?? null;
|
||||
event.linkStart = prevId;
|
||||
}
|
||||
newEvent = createEvent(event, eventIndex.toString());
|
||||
// skip if event is invalid
|
||||
|
||||
Reference in New Issue
Block a user