Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

`as const` wasn't working

Manav Rathi3093894b1200
diff --git a/web/packages/new/photos/services/ml/people.ts b/web/packages/new/photos/services/ml/people.ts
index 6b2f305245..3287d44919 100644
--- a/web/packages/new/photos/services/ml/people.ts
+++ b/web/packages/new/photos/services/ml/people.ts
@@ -169,6 +169,10 @@ export const reconstructPeople = async (): Promise<Person[]> => {
}
}
+ // Help out tsc.
+ const typeCGroup: Person["type"] = "cgroup";
+ const typeCluster: Person["type"] = "cluster";
+
// Convert cgroups to people.
const cgroups = await savedCGroupUserEntities();
const cgroupPeople = cgroups.map(({ id, data: cgroup }) => {
@@ -211,7 +215,7 @@ export const reconstructPeople = async (): Promise<Person[]> => {
}
return {
- type: "cgroup" as const,
+ type: typeCGroup,
id,
name: cgroup.name,
fileIDs,
@@ -235,7 +239,7 @@ export const reconstructPeople = async (): Promise<Person[]> => {
);
return {
- type: "cluster" as const,
+ type: typeCluster,
id: cluster.id,
name: undefined,
fileIDs: [...new Set(faces.map((f) => f.file.id))],