mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 21:58:22 +03:00
fix: variable shadowing silently drops object label updates (#22472)
When an existing tracked object's label or stationary status changes (e.g. sub_label assignment from face recognition), the update handler declares a new const newObjects that shadows the outer let newObjects. The label and stationary mutations apply to the inner copy, but handleSetObjects on line 148 reads the outer variable which was never mutated. The update is silently discarded. Remove the inner declaration so mutations apply to the outer variable that gets passed to handleSetObjects.
This commit is contained in:
parent
bc29c4ba71
commit
dfc6ff9202
@ -125,8 +125,6 @@ export function useCameraActivity(
|
||||
newObjects = [...(objects ?? []), newActiveObject];
|
||||
}
|
||||
} else {
|
||||
const newObjects = [...(objects ?? [])];
|
||||
|
||||
let label = updatedEvent.after.label;
|
||||
|
||||
if (updatedEvent.after.sub_label) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user