From 965cca9d392d6477209e9131c434d92db7f65ddc Mon Sep 17 00:00:00 2001 From: Raccoon Date: Wed, 28 Apr 2021 17:37:43 +0800 Subject: [PATCH] fix: lint Signed-off-by: Raccoon --- lib/models/note.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/models/note.js b/lib/models/note.js index 2a45513c..ad968e7b 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -92,18 +92,17 @@ module.exports = function (sequelize, DataTypes) { return new Promise(function (resolve, reject) { // if no content specified then use default note if (!note.content) { - var body = null let filePath = config.defaultNotePath if (note.alias) { - const notePathInDocPath = path.join(config.docsPath, path.basename(node.alias) + '.md') + const notePathInDocPath = path.join(config.docsPath, path.basename(note.alias) + '.md') if (Note.checkFileExist(notePathInDocPath)) { filePath = notePathInDocPath } } if (Note.checkFileExist(filePath)) { - let noteInFS = readFileSystemNote(filePath) + const noteInFS = readFileSystemNote(filePath) note.title = noteInFS.title note.content = noteInFS.content if (filePath !== config.defaultNotePath) {