1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Merge pull request #2253 from mbarczak/master

Fix for issue #2088 :  snippet notes are not displaying in markdown
This commit is contained in:
Junyoung Choi (Sai)
2018-08-09 18:07:29 +09:00
committed by GitHub

View File

@@ -82,9 +82,9 @@ function createAttachmentDestinationFolder (destinationStoragePath, noteKey) {
* @param noteKey Key of the current note
*/
function migrateAttachments (markdownContent, storagePath, noteKey) {
if (sander.existsSync(path.join(storagePath, 'images'))) {
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) {