Added id check before calling fetchContactNotes function
This commit is contained in:
parent
289f4063f9
commit
49a3bec527
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user