diff --git a/browser/main/lib/dataApi/attachmentManagement.js b/browser/main/lib/dataApi/attachmentManagement.js index 46560a1a..d1e0ab62 100644 --- a/browser/main/lib/dataApi/attachmentManagement.js +++ b/browser/main/lib/dataApi/attachmentManagement.js @@ -84,7 +84,7 @@ function createAttachmentDestinationFolder (destinationStoragePath, noteKey) { function migrateAttachments (markdownContent, storagePath, noteKey) { if (noteKey !== undefined && sander.existsSync(path.join(storagePath, 'images'))) { const attachments = getAttachmentsInMarkdownContent(markdownContent) || [] - if (attachments !== []) { + if (attachments.length) { createAttachmentDestinationFolder(storagePath, noteKey) } for (const attachment of attachments) {