Skip to content

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

fix crash when opening actionsheet in trash

ammarahm-ed5159593a7052
diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js
index 6d99962c5..0ddad1467 100644
--- a/apps/mobile/src/components/NoteItem/index.js
+++ b/apps/mobile/src/components/NoteItem/index.js
@@ -17,9 +17,9 @@ const NoteItem = ({item, customStyle, isTrash, fontScale}) => {
const {colors} = state;
const showActionSheet = () => {
- let note = db.notes.note(item?.id)?.data;
+ let note = isTrash? item : db.notes.note(item?.id)?.data;
ActionSheetEvent(
- note || item,
+ note ? note : item,
isTrash ? false : true,
isTrash ? false : true,
isTrash