This commit is contained in:
Abhinav 2022-03-15 13:24:10 +05:30
parent f12c1d569a
commit 758c816fa9

View file

@ -11,9 +11,9 @@ export function ObjectLabelList(props: { file: EnteFile }) {
const things = await mlIDbStorage.getAllThingsMap();
const uniqueObjectNames = [
...new Set(
things
.get(props.file.id)
.map((object) => object.detection.class)
(things.get(props.file.id) ?? []).map(
(object) => object.detection.class
)
),
];
!didCancel && setObjects(uniqueObjectNames);