mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
core: fix undefined is not an object when publishing empty note
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user