fix: use correct order when creating groups

This commit is contained in:
Carlos Valente
2025-10-05 07:19:30 +02:00
committed by Alex Christoffer Rasmussen
parent 960a39fbf4
commit 700948bfbb
2 changed files with 42 additions and 2 deletions
@@ -498,7 +498,7 @@ function group(rundown: Rundown, entryIds: EntryId[]): OntimeGroup {
// the group will be created at the first selected event position
// note that this is not the lowest index
if (firstIndex === -1) {
firstIndex = rundown.flatOrder.indexOf(entryId);
firstIndex = rundown.order.indexOf(entryId);
}
nestedEvents.push(entryId);