From 8a18d18d59e4208ecd8f5e037124f1fbc37216f1 Mon Sep 17 00:00:00 2001 From: vvvvvv1vvvvvv <86296331+vvvvvv1vvvvvv@users.noreply.github.com> Date: Sun, 3 Nov 2024 14:39:13 +0800 Subject: [PATCH] fix: remove debounce for setStorage (#2604) --- src/background/utils/persistStore.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/background/utils/persistStore.ts b/src/background/utils/persistStore.ts index 652948d788c..99fae169657 100644 --- a/src/background/utils/persistStore.ts +++ b/src/background/utils/persistStore.ts @@ -1,12 +1,11 @@ /* eslint-disable @typescript-eslint/ban-types */ import { storage } from 'background/webapi'; -import { debounce } from 'lodash'; import { syncStateToUI } from './broadcastToUI'; import { BROADCAST_TO_UI_EVENTS } from '@/utils/broadcastToUI'; -const persistStorage = debounce((name: string, obj: object) => { +const persistStorage = (name: string, obj: object) => { storage.set(name, obj); -}, 500); +}; interface CreatePersistStoreParams { name: string;