diff --git a/server/src/infra/repositories/person.repository.ts b/server/src/infra/repositories/person.repository.ts index 5f54bc2b35..14c847ef6d 100644 --- a/server/src/infra/repositories/person.repository.ts +++ b/server/src/infra/repositories/person.repository.ts @@ -223,6 +223,10 @@ export class PersonRepository implements IPersonRepository { .having('COUNT(face.assetId) != 0') .getRawOne(); + if (items == undefined) { + return { total: 0, hidden: 0 }; + } + const result: PeopleStatistics = { total: items.total ?? 0, hidden: items.hidden ?? 0,