Gracefully handle events with invalid locations

This commit is contained in:
Hornwitser 2025-03-05 22:14:58 +01:00
parent e45e51ef7a
commit f42dfcc13d

View file

@ -180,7 +180,7 @@ function* spansFromJunctions(
for (const edge of start.edges) {
if (edge.type === "start") {
for (const location of edge.slot.locations) {
activeLocations.get(location)!.add(edge.slot)
activeLocations.get(location)?.add(edge.slot)
}
}
}
@ -196,7 +196,7 @@ function* spansFromJunctions(
for (const edge of end.edges) {
if (edge.type === "end") {
for (const location of edge.slot.locations) {
activeLocations.get(location)!.delete(edge.slot)
activeLocations.get(location)?.delete(edge.slot)
}
}
}