Check sortie checklist summary totals
This commit is contained in:
@@ -9586,6 +9586,9 @@ function assertSortieTacticalRoster(state, requiredUnitIds) {
|
||||
) {
|
||||
throw new Error(`Expected sortie checklist summary counts: ${JSON.stringify(state.sortieChecklistSummary)}`);
|
||||
}
|
||||
if (Array.isArray(state.sortieChecklist) && state.sortieChecklistSummary.total !== state.sortieChecklist.length) {
|
||||
throw new Error(`Expected sortie checklist summary total to match checklist length: ${JSON.stringify(state.sortieChecklistSummary)}`);
|
||||
}
|
||||
|
||||
const missingIds = requiredUnitIds.filter((unitId) => !state.sortieRoster.some((unit) => unit.id === unitId));
|
||||
if (missingIds.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user