From 616df5e869671223104c9c515311439e36a75698 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Thu, 29 May 2025 20:09:35 +0530 Subject: [PATCH] Added id check before calling fetchContactNotes function --- src/hooks/useDirectory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useDirectory.js b/src/hooks/useDirectory.js index 7ec08c4b..1c0c3433 100644 --- a/src/hooks/useDirectory.js +++ b/src/hooks/useDirectory.js @@ -136,7 +136,7 @@ export const useContactNotes = (id, IsActive) => { useEffect(() => { const cached = getCachedData("Contact Notes"); if (!cached || cached.contactId !== id) { - fetchContactNotes(id,IsActive); + id && fetchContactNotes(id,IsActive); } else { setContactNotes(cached.data); }