aboutsummaryrefslogtreecommitdiff
path: root/packages/web-util/src
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-09-25 09:31:04 -0300
committerSebastian <sebasjm@gmail.com>2023-09-25 14:50:45 -0300
commitfd9ed97fdc60baaa3f74a3f7b02c6831c6d6948b (patch)
treec9639261e53de8d0e1b9bd071181da0b814ca85d /packages/web-util/src
parentae49194d4271f1108ec9b8318ea3b7977314cb85 (diff)
downloadwallet-core-fd9ed97fdc60baaa3f74a3f7b02c6831c6d6948b.tar.xz
do not reuse the same map instance
Diffstat (limited to 'packages/web-util/src')
-rw-r--r--packages/web-util/src/hooks/useNotifications.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/web-util/src/hooks/useNotifications.ts b/packages/web-util/src/hooks/useNotifications.ts
index 52e626b38..2f9df24f9 100644
--- a/packages/web-util/src/hooks/useNotifications.ts
+++ b/packages/web-util/src/hooks/useNotifications.ts
@@ -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));
});
});