Added id check before calling fetchContactNotes function
This commit is contained in:
parent
a88a8d3df9
commit
616df5e869
@ -136,7 +136,7 @@ export const useContactNotes = (id, IsActive) => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const cached = getCachedData("Contact Notes");
|
const cached = getCachedData("Contact Notes");
|
||||||
if (!cached || cached.contactId !== id) {
|
if (!cached || cached.contactId !== id) {
|
||||||
fetchContactNotes(id,IsActive);
|
id && fetchContactNotes(id,IsActive);
|
||||||
} else {
|
} else {
|
||||||
setContactNotes(cached.data);
|
setContactNotes(cached.data);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user