Skip to content

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

mobile: fix crash when checking no of notes (#1554)

Ammar Ahmedc0212c64bc00
diff --git a/apps/mobile/app/components/attachments/actions.js b/apps/mobile/app/components/attachments/actions.js
index d4279b4f1..821fe244a 100644
--- a/apps/mobile/app/components/attachments/actions.js
+++ b/apps/mobile/app/components/attachments/actions.js
@@ -230,16 +230,18 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {
{formatBytes(attachment.length)}
</Paragraph>
- <Paragraph
- style={{
- marginRight: 10
- }}
- size={SIZE.xs + 1}
- color={colors.icon}
- >
- {attachment.noteIds.length} note
- {attachment.noteIds.length > 1 ? "s" : ""}
- </Paragraph>
+ {attachment.noteIds ? (
+ <Paragraph
+ style={{
+ marginRight: 10
+ }}
+ size={SIZE.xs + 1}
+ color={colors.icon}
+ >
+ {attachment.noteIds.length} note
+ {attachment.noteIds.length > 1 ? "s" : ""}
+ </Paragraph>
+ ) : null}
<Paragraph
onPress={() => {
Clipboard.setString(attachment.metadata.hash);