do not reuse the same map instance

This commit is contained in:
Sebastian 2023-09-25 09:31:04 -03:00
parent ae49194d42
commit fd9ed97fdc
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069

View File

@ -53,7 +53,7 @@ export function useNotifications(): Notification[] {
useEffect(() => {
return storage.onUpdate(NOTIFICATION_KEY, () => {
const mem = storage.get(NOTIFICATION_KEY) ?? new Map();
setter(mem);
setter(structuredClone(mem));
});
});