Added id check before calling fetchContactNotes function

This commit is contained in:
Pramod Mahajan 2025-05-29 20:09:35 +05:30 committed by pramod.mahajan
parent a88a8d3df9
commit 616df5e869

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