fix: reset un-assigned person

This commit is contained in:
martabal 2023-12-06 16:08:40 +01:00
parent bbe86a4632
commit 5a08b7e25e
No known key found for this signature in database
GPG key ID: C00196E3148A52BD

View file

@ -151,8 +151,10 @@
const handleAddRemovedFace = (indexToRemove: number) => { const handleAddRemovedFace = (indexToRemove: number) => {
$boundingBoxesArray = []; $boundingBoxesArray = [];
unassignedFaces = unassignedFaces.map((obj) =>
obj && obj.id === selectedPersonToUnassign[indexToRemove].id ? null : obj,
);
selectedPersonToUnassign = selectedPersonToUnassign.filter((_, index) => index !== indexToRemove); selectedPersonToUnassign = selectedPersonToUnassign.filter((_, index) => index !== indexToRemove);
peopleWithFaces = peopleWithFaces
}; };
const handleUnassignFaces = async () => { const handleUnassignFaces = async () => {