Added id check before calling fetchContactNotes function

This commit is contained in:
Pramod Mahajan 2025-05-29 20:09:35 +05:30
parent 289f4063f9
commit 49a3bec527

View File

@ -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);
}