This commit is contained in:
larssand
2026-03-27 19:35:05 +01:00
parent f5be5b57ad
commit 346eb41e75
2 changed files with 16 additions and 13 deletions

View File

@@ -509,15 +509,10 @@ export function getEventTeams(event, { normalizeRaceTeam }) {
export function getTeamDriverPool(event, { getEventDrivers, state }) {
const classDrivers = state.drivers.filter((driver) => !event?.classId || driver.classId === event.classId);
if (classDrivers.length) {
return { drivers: classDrivers, fallback: false };
}
const scopedDrivers = getEventDrivers(event);
if (scopedDrivers.length) {
return { drivers: scopedDrivers, fallback: false };
}
return { drivers: [], fallback: false };
return {
drivers: Array.isArray(state?.drivers) ? [...state.drivers] : [],
fallback: false,
};
}