mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
prevent unnecessary reloads in useUserPersistence hook
This commit is contained in:
parent
c2e667c0dd
commit
22056c3fc1
@ -116,6 +116,11 @@ export function useUserPersistence<S>(
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip reload if we're already loaded for this key
|
||||
if (loadedKeyRef.current === namespacedKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset state when key changes - this prevents stale writes
|
||||
loadedKeyRef.current = null;
|
||||
migrationAttemptedRef.current = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user