fix unnecessary notes page refreshing

This commit is contained in:
ammarahm-ed
2022-07-20 13:13:39 +05:00
parent e4185bfec8
commit 706bd6e9e9

View File

@@ -126,7 +126,7 @@ const NotesPage = ({
};
const onRequestUpdate = (data?: NotesScreenParams) => {
const isNew = data?.item?.id !== params.current?.item?.id;
const isNew = data && data?.item?.id !== params.current?.item?.id;
if (data) params.current = data;
params.current.title = params.current.title || params.current.item.title;
const { item } = params.current;