Browse Source

fix: reset un-assigned person

martabal 1 year ago
parent
commit
5a08b7e25e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      web/src/lib/components/faces-page/person-side-panel.svelte

+ 3 - 1
web/src/lib/components/faces-page/person-side-panel.svelte

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