From 78614619778a68602aaf7f660cdfb8dd03d15177 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 13 Jun 2024 21:26:33 +0000 Subject: [PATCH] fix: coderabbit suggestion and passing args correctly --- packages/nc-gui/composables/useDebounceFnCached.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/composables/useDebounceFnCached.ts b/packages/nc-gui/composables/useDebounceFnCached.ts index d01c1aab5e..20137331bf 100644 --- a/packages/nc-gui/composables/useDebounceFnCached.ts +++ b/packages/nc-gui/composables/useDebounceFnCached.ts @@ -26,9 +26,9 @@ export function useCachedDebouncedFunction( // Cache to store debounced functions based on a unique key const debounceCache = new Map() - return function (...args: Parameters): ReturnType { + return (...args: Parameters): ReturnType => { // Generate a unique key for the given arguments - const key = getCacheKey(args) + const key = getCacheKey(...args) // If the debounced function for the given key is not in the cache, create and cache it if (!debounceCache.has(key)) {