Skip to content

Commit

Permalink
Merge pull request #2253 from mbarczak/master
Browse files Browse the repository at this point in the history
Fix for issue #2088 :  snippet notes are not displaying in markdown
  • Loading branch information
Rokt33r authored Aug 9, 2018
2 parents 5aae9a4 + 4a3bcab commit 38af257
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser/main/lib/dataApi/attachmentManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 38af257

Please sign in to comment.