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

Fix for the issues raised in the code review

This commit is contained in:
ehhc
2018-05-28 08:58:09 +02:00
parent 2f4eb595f6
commit 8132dd6847
2 changed files with 33 additions and 1 deletions

View File

@@ -232,7 +232,7 @@ function deleteAttachmentFolder (storageKey, noteKey) {
* @param noteKey NoteKey of the current note. Is used to determine the belonging attachment folder.
*/
function deleteAttachmentsNotPresentInNote (markdownContent, storageKey, noteKey) {
if (storageKey && noteKey && markdownContent !== null && typeof markdownContent !== 'undefined') {
if (storageKey != null && noteKey != null && markdownContent != null) {
const targetStorage = findStorage.findStorage(storageKey)
const attachmentFolder = path.join(targetStorage.path, DESTINATION_FOLDER, noteKey)
const attachmentsInNote = getAttachmentsInContent(markdownContent)