Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix unnecessary notes page refreshing

ammarahm-ed706bd6e9e943
diff --git a/apps/mobile/src/screens/notes/index.tsx b/apps/mobile/src/screens/notes/index.tsx
index 9989f0afc..80b8c848e 100644
--- a/apps/mobile/src/screens/notes/index.tsx
+++ b/apps/mobile/src/screens/notes/index.tsx
@@ -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;