From 5a08b7e25e2568a8fce202facadb2da0661f82f2 Mon Sep 17 00:00:00 2001 From: martabal <74269598+martabal@users.noreply.github.com> Date: Wed, 6 Dec 2023 16:08:40 +0100 Subject: [PATCH] fix: reset un-assigned person --- web/src/lib/components/faces-page/person-side-panel.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/lib/components/faces-page/person-side-panel.svelte b/web/src/lib/components/faces-page/person-side-panel.svelte index aded8ae0f..b2e2cf4c7 100644 --- a/web/src/lib/components/faces-page/person-side-panel.svelte +++ b/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 () => {