Filter self-referential campaign bonds
This commit is contained in:
@@ -1386,7 +1386,7 @@ function normalizeCampBondSnapshot(value: unknown): CampBondSnapshot | undefined
|
||||
const unitIds = arrayOrEmpty<unknown>(value.unitIds).filter((unitId): unitId is string => typeof unitId === 'string' && unitId.length > 0);
|
||||
const id = normalizeKeyString(value.id);
|
||||
const title = normalizeDisplayString(value.title);
|
||||
if (!id || !title || unitIds.length < 2) {
|
||||
if (!id || !title || unitIds.length < 2 || unitIds[0] === unitIds[1]) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user