From 706bd6e9e94378d0925332c2b84c2b3b0f1cc3bb Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 20 Jul 2022 13:13:39 +0500 Subject: [PATCH] fix unnecessary notes page refreshing --- apps/mobile/src/screens/notes/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;