Add multi-decoder split and pit timing support
This commit is contained in:
1 parent
6f02e955a5
commit
8ea8b3a84e
20 files changed
+876
-147
No files matched your search
+12
-2
@@ -99,6 +99,9 @@ export function ensureSessionResult(sessionId, { state }) {
|
||||
if (!state.resultsBySession[sessionId]) {
|
||||
state.resultsBySession[sessionId] = {
|
||||
passings: [],
|
||||
splits: [],
|
||||
pitEvents: [],
|
||||
pitStops: [],
|
||||
competitors: {},
|
||||
adjustments: [],
|
||||
};
|
||||
@@ -106,6 +109,15 @@ export function ensureSessionResult(sessionId, { state }) {
|
||||
if (!Array.isArray(state.resultsBySession[sessionId].adjustments)) {
|
||||
state.resultsBySession[sessionId].adjustments = [];
|
||||
}
|
||||
if (!Array.isArray(state.resultsBySession[sessionId].splits)) {
|
||||
state.resultsBySession[sessionId].splits = [];
|
||||
}
|
||||
if (!Array.isArray(state.resultsBySession[sessionId].pitEvents)) {
|
||||
state.resultsBySession[sessionId].pitEvents = [];
|
||||
}
|
||||
if (!Array.isArray(state.resultsBySession[sessionId].pitStops)) {
|
||||
state.resultsBySession[sessionId].pitStops = [];
|
||||
}
|
||||
return state.resultsBySession[sessionId];
|
||||
}
|
||||
|
||||
@@ -831,5 +843,3 @@ export function buildFinalStandings(event, { getSessionsForEvent, buildLeaderboa
|
||||
return a.orderingIndex - b.orderingIndex;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user