Fix lints

This commit is contained in:
Manav Rathi
2024-09-26 17:44:18 +05:30
parent 1daa0f3e07
commit 262ff01999

View File

@@ -22,7 +22,7 @@ import type { UploadItem } from "../upload/types";
import { pullUserEntities } from "../user-entity";
import { regenerateFaceCrops } from "./crop";
import { clearMLDB, getFaceIndex, getIndexableAndIndexedCounts } from "./db";
import { reconstructPeople, type NamedPerson, type Person } from "./people";
import { reconstructPeople, type Person } from "./people";
import { MLWorker } from "./worker";
import type { CLIPMatches } from "./worker-types";
@@ -551,7 +551,11 @@ const updatePeople = async () => {
const people = await reconstructPeople();
// Notify the search subsystem of the update (search only uses named ones).
setSearchPeople(people.filter((p): p is NamedPerson => !!p.name));
// See: [Note: strict mode migration]
//
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
setSearchPeople(people.filter((p) => typeof p.name !== "undefined"));
// Update our in-memory list of people.
setPeopleSnapshot(people);