From a6ebe092e86fa977b49c276ac56e83cabafd7f2d Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 2 Oct 2023 15:15:21 +0500 Subject: [PATCH] core: fix undefined is not an object when publishing empty note --- packages/core/src/collections/content.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/collections/content.js b/packages/core/src/collections/content.js index 5d5ee4bca..3823fd59a 100644 --- a/packages/core/src/collections/content.js +++ b/packages/core/src/collections/content.js @@ -116,6 +116,7 @@ export default class Content extends Collection { } async downloadMedia(groupId, contentItem, notify = true) { + if (!contentItem) return contentItem; const content = getContentFromData(contentItem.type, contentItem.data); contentItem.data = await content.insertMedia(async (hashes) => { const attachments = hashes.map((h) => this._db.attachments.attachment(h));