Skip to content

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

mobile: fix crash on get search items

ammarahm-ed3e446ce9ddcc
diff --git a/apps/mobile/app/screens/notebook/index.tsx b/apps/mobile/app/screens/notebook/index.tsx
index 167096352..31e18cf4e 100644
--- a/apps/mobile/app/screens/notebook/index.tsx
+++ b/apps/mobile/app/screens/notebook/index.tsx
@@ -118,6 +118,7 @@ const Notebook = ({ route, navigation }: NavigationProps<"Notebook">) => {
get: () => {
const notebook = db.notebooks?.notebook(params?.current?.item?.id)
?.data as NotebookType;
+ if (!notebook) return [];
return db.relations?.from(notebook, "note");
}
});